Closed Thread
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: random quote generator

  1. #1
    vocalstud69 is offline Newbie
    Join Date
    Sep 2008
    Posts
    11
    Rep Power
    0

    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. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

    Re: random quote generator

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

  4. #3
    vocalstud69 is offline Newbie
    Join Date
    Sep 2008
    Posts
    11
    Rep Power
    0

    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.

  5. #4
    Join Date
    May 2008
    Posts
    2,126
    Blog Entries
    1
    Rep Power
    33

    Re: random quote generator

    Dude learn the language, ****.

  6. #5
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59

    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.

  7. #6
    Join Date
    Jan 2008
    Posts
    1,725
    Blog Entries
    4
    Rep Power
    29

    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.

  8. #7
    Join Date
    May 2008
    Posts
    2,126
    Blog Entries
    1
    Rep Power
    33

    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.

  9. #8
    Join Date
    Jan 2008
    Posts
    1,725
    Blog Entries
    4
    Rep Power
    29

    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.

  10. #9
    Join Date
    May 2008
    Posts
    2,126
    Blog Entries
    1
    Rep Power
    33

    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

  11. #10
    vocalstud69 is offline Newbie
    Join Date
    Sep 2008
    Posts
    11
    Rep Power
    0

    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.

Closed Thread
Page 1 of 4 123 ... LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Java: Random Name Generator
    By Sinipull in forum Classes and Code Snippets
    Replies: 2
    Last Post: 05-05-2011, 07:26 AM
  2. Random number generator?
    By sjshacker93 in forum Visual Basic Programming
    Replies: 5
    Last Post: 09-03-2010, 09:27 PM
  3. Random Password Generator
    By Sauce in forum Visual Basic Programming
    Replies: 13
    Last Post: 06-25-2009, 02:57 PM
  4. Need Help Creating A Random Generator
    By KingCrimson250 in forum PHP Development
    Replies: 4
    Last Post: 06-21-2009, 09:08 AM
  5. Random Name Generator
    By DevilsCharm in forum C and C++
    Replies: 1
    Last Post: 11-07-2007, 09:38 PM

Tags for this Thread

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