Thread: Something unquie to spice up my programs!

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    1

    Something unquie to spice up my programs!

    Hello, I am a freshman college student. I have taken about 1 year of C++ programming. The reason i am posting is can someone tell me how i can add little unquie addons to my programs to spice them up, making them less dull? For example /a makes a ding sound, things like that.

  2. #2
    Registered User biosx's Avatar
    Join Date
    Aug 2001
    Posts
    230
    There are alot of cool tidbits in conio.h and windows.h that you can add to your console apps. Making text different colors and going to different places within the console window.

    I think the most overused trick (especially on these forums :-D) is the write/sleep function that makes your text look like it's being typed. It's actually kind of neat. It goes something like this:
    Code:
    void typeOut(char *string)
    {
       while( *string != '\0' )
       {
          cout << *string++;       // Print out character and advance to next spot in string
          Sleep(25)                // Pause for a bit
       }
    }
    Instead of using Sleep(), you could also use delay() which is in dos.h (so you would need a DOS compiler).

    So I say check out MSDN and look up console functions and tips and tricks. Good luck, man, and let us know if you find out anything cool.

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Do it so a naked picture of you pops up everytime someone presses the space bar.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Do it so a naked picture of you pops up everytime someone presses the space bar.
    How about not?

    >how i can add little unquie addons to my programs to spice them up
    For the most part unique addons will be nonstandard. So be very sure that you want to sacrifice standards and portability for something "neato".

    -Prelude
    My best code is written with the delete key.

  5. #5
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    I think you can get a ping sound with \a or something like that. Very exciting, I know.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  2. Way to get the current open programs displayed?
    By CPPguy1111 in forum C++ Programming
    Replies: 6
    Last Post: 06-22-2005, 12:24 AM
  3. Problem using java programs within C code
    By lemania in forum Linux Programming
    Replies: 1
    Last Post: 05-08-2005, 02:02 AM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 03:12 AM