Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38

Thread: C Problems

  1. #31
    Join Date
    Aug 2004
    Posts
    2,789
    Rep Power
    0

    Default Re: C Problems

    Yeah, getchar(); gives the error:
    Call to undefined function 'getchar'
    The views expressed in the above post are not neccesarily the views of icuucme.

  2. #32
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default Re: C Problems

    yes use systm("cls") .

    UPDATE:

    I am really tired i just realized that i answered the wrong question.

    If you want to clear the screen you can use system() function from stdlib.h. you can consider the system function as a command interface. So to clear the screen you will type system("cls"); in your code.

  3. #33
    Join Date
    Aug 2004
    Posts
    2,789
    Rep Power
    0

    Default Re: C Problems

    Would stdlib.h affect the code you gave for adding colour?
    The views expressed in the above post are not neccesarily the views of icuucme.

  4. #34
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default Re: C Problems

    Quote Originally Posted by icuucme
    Would stdlib.h affect the code you gave for adding colour?
    nope, shouldn't.

    on another side:

    i just realize that system("pause") may not be idle because it always print the text "Press any key to continue . . .", so i'll still try to search for a better method. unless thats ok with you.

  5. #35
    Join Date
    Aug 2004
    Posts
    2,789
    Rep Power
    0

    Default Re: C Problems

    I deleted the system("pause"), didnt really like message that came up. Didnt need it anyways, the program still runs even without getch(). I get an error when i put in the color class tho.
    The views expressed in the above post are not neccesarily the views of icuucme.

  6. #36
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default Re: C Problems

    Quote Originally Posted by icuucme
    I deleted the system("pause"), didnt really like message that came up. Didnt need it anyways, the program still runs even without getch(). I get an error when i put in the color class tho.
    OK, i c.. i'll try a few things in borland later, unless your running on a deadline? I would say leave it out, but if your not i should be able to post a solution later.

  7. #37
    Join Date
    Aug 2004
    Posts
    2,789
    Rep Power
    0

    Default Re: C Problems

    Thanx, i can wait, i would really want colour in the program without using cprintf
    The views expressed in the above post are not neccesarily the views of icuucme.

  8. #38
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default Re: C Problems

    LOL, getchar(); is a part of the stdio.h library i can't beleive that missed me.

    Anyways i made the modification tested it and its ok.

Posting Permissions

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