+ Reply to Thread
Page 1 of 4
1 2 3 ... LastLast
Results 1 to 10 of 31

Thread: random quote generator

  1. #1
    Newbie vocalstud69 is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    11

    random quote generator

    I actually don't know much about C++, but a programmer friend of mine said that C++ would be the easiest way to do what I want. I wanted to make a small program that all it does is have a little icon in the Window's XP/Vista Taskbar that every hour randomly spits out a quote from a text file that has quotes typed in it that I make up. I have no problem learning what I need to to do this, but I'm just wondering if C++ would be the easiest way. Thanks, and sorry if this newbie question is annoying.

  2. #2
    Co-Administrator John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John is a glorious beacon of light John's Avatar
    Join Date
    Jul 2006
    Age
    21
    Posts
    5,882
    Blog Entries
    25

    Re: random quote generator

    C# is probably the easiest way, but C++ is probably the best way.

  3. #3
    Newbie vocalstud69 is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    11

    Re: random quote generator

    Yeah, and it gives me an opportunity to learn C++. Do you know what tools I'd need to build the program? I have the C/C++ Eclipse editor already, and I think I need an API. I think. This is my first foray into C, so I wanted something interesting, but small.

  4. #4
    MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all
    Join Date
    May 2008
    Posts
    473

    Re: random quote generator

    Dude learn the language, ****.

  5. #5
    Code Warrior dargueta has much to be proud of dargueta has much to be proud of dargueta has much to be proud of dargueta has much to be proud of dargueta has much to be proud of dargueta has much to be proud of dargueta has much to be proud of dargueta has much to be proud of dargueta's Avatar
    Join Date
    Oct 2007
    Age
    19
    Posts
    2,816
    Blog Entries
    8

    Re: random quote generator

    Although MeTh0Dz is right, I think you can still do this, but not the taskbar part. I've been doing C/C++ for four years and have never tried doing a taskbar app, although I'm sure it's not as bad as some other things. You're going to need to include windows.h and iostream.

    To read from the file, use the ifstream object.
    To make your application wait an hour, call Sleep(0x0036EE80). (That's one hour measured in milliseconds.)
    Look on MSDN for the rest.

  6. #6
    Guru morefood2001 is just really nice morefood2001 is just really nice morefood2001 is just really nice morefood2001 is just really nice
    Join Date
    Jan 2008
    Posts
    1,724
    Blog Entries
    4

    Re: random quote generator

    Quote Originally Posted by John View Post
    C# is probably the easiest way, but C++ is probably the best way.
    I can't agree more. C# is based in windows and is a mix of C++ and Java so it will have the most available windows functionality. C++ will require more work, but will most likely run much faster.

  7. #7
    MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all
    Join Date
    May 2008
    Posts
    473

    Re: random quote generator

    Quote Originally Posted by morefood2001 View Post
    I can't agree more. C# is based in windows and is a mix of C++ and Java so it will have the most available windows functionality. C++ will require more work, but will most likely run much faster.
    Once again your wrong.

    C# is inherently more limited and less powerful than C++, giving C++ more functionality on Windows.

  8. #8
    Guru morefood2001 is just really nice morefood2001 is just really nice morefood2001 is just really nice morefood2001 is just really nice
    Join Date
    Jan 2008
    Posts
    1,724
    Blog Entries
    4

    Re: random quote generator

    Quote Originally Posted by MeTh0Dz|Reb0rn View Post
    Once again your wrong.

    C# is inherently more limited and less powerful than C++, giving C++ more functionality on Windows.
    C#/C++

    Using this as a support, both will run similarly, but C# will be much easier and since it was built for windows, it is even more easy for this certain task. C++ will have more issues to resolve, but will in the end complete the task more efficiently.

  9. #9
    MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all MeTh0Dz is a name known to all
    Join Date
    May 2008
    Posts
    473

    Re: random quote generator

    Quote Originally Posted by morefood2001 View Post
    C#/C++

    Using this as a support, both will run similarly, but C# will be much easier and since it was built for windows, it is even more easy for this certain task. C++ will have more issues to resolve, but will in the end complete the task more efficiently.
    Don't link me pages about C# and C++...

    Also you said FUNCTIONALITY, which is what I was referring to. C++ has MORE FUNCTIONALITY.

    EOD

  10. #10
    Newbie vocalstud69 is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    11

    Re: random quote generator

    If I were writing the program in Linux, it might be easier, but I'm writing this for a friend, so it has to be used on Windows. Does anyone know what programs to use for writing the actual code than compiling into a binary? I've got Eclipse Ganymede installed, along with MinGW and MSYS, but I can't get them to compile a Hello, World. It's really annoying me. I don't think I set them up right. Can anyone help me with that, or point me towards an up to date tutorial for it? I found one that's two years old, and still on 3.0 for MinGW, even though the new version is 5.0. I might not have set up Eclipse to work with the compilers. Thanks in advance.

    Also, my friend suggested I look at writing it in Python or Java, and I think that those would be able to give me the message bubble with the quote, but I'm not sure. I have a little experience with both Java and Python; using GNU/Linux requires a base knowledge of Python, which took me a little while to figure out.

+ Reply to Thread
Page 1 of 4
1 2 3 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. random number generator
    By chili5 in forum JavaScript and CSS
    Replies: 4
    Last Post: 06-01-2008, 06:55 AM
  2. Random Name Generator
    By DevilsCharm in forum C and C++
    Replies: 1
    Last Post: 11-07-2007, 11:38 PM
  3. Random Generator of Unequal Numbers
    By Paradine in forum PHP Tutorials
    Replies: 0
    Last Post: 08-26-2007, 02:11 PM
  4. Floating Point random number generator
    By Paradine in forum PHP Tutorials
    Replies: 0
    Last Post: 08-26-2007, 02:09 PM
  5. How do I program a random generator?
    By eddiewillers in forum General Programming
    Replies: 4
    Last Post: 07-24-2007, 02:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts