Color problem

This is a discussion on Color problem within the C Programming forums, part of the General Programming Boards category; I setted my color to Green in the chart but now whenever i try to set the color back to ...

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    4

    Color problem

    I setted my color to Green in the chart but now whenever i try to set the color back to deafult it still comes out green! help!

    ps: It still only works on Multiplayer... Im not done with this yet
    Attached Files Attached Files

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,602
    Well, you actually never set back to default because you've totally messed up wOldColorAttrs. You're only setting it back in "GetAnswerMulti()", but you've already set it in main, so there's no point! Pass wOldColorAttrs into each function are argument instead of loading again and again.
    Oh, your "getrand()" function is logically wrong. "srand(time(NULL))" should be called only once at the beginning of your program.
    Devoted my life to programming...

  3. #3
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,403
    oh wow, ok fine, but that is a mighty big dumper load of unformatted code spaghetti that was just hoiked in there, twice, and there is no way i am trawling through it.

    look up indentation.
    use code tags
    post less code, especially if it looks like that!
    use the 'edit' button if you need to change something you posted.
    open a new thread
    Last edited by rogster001; 11-16-2010 at 07:44 AM. Reason: "use cod tags" - only relevant in "AskAFisherman.com" forum, changed to use CODE tags.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21