Results 1 to 5 of 5

Thread: clrscr()

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205

    clrscr()

    why is it that in some versions of conio.h, there is the clrscr() function. I notice that borland c++ has this in the conio.h header file but ms visual c++ doesnt. I dont actually have my copy of borland anymore, so is there anybody that can tell me how to clear the screen, or anybody that can send me the version of conio.h with the function built in.

  2. #2
    Addicted Member
    Join Date
    Aug 2001
    Location
    I'm mobile
    Posts
    166
    the code below clears the screen:
    system("cls");
    [p r a e t o r i a n]

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205
    what header do i need to include in order to get system() to work? I see its known to visual C++ because it displays the tool tip text for the function. However, it fails to compile.

    --------------------Configuration: ctp - Win32 Debug--------------------
    Compiling...
    ctp.cpp
    D:\Personal\Programs\ctp\ctp.cpp(8) : error C2065: 'system' : undeclared identifier
    Error executing cl.exe.

    ctp.exe - 1 error(s), 0 warning(s)

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Originally posted by craig_phillips2
    what header do i need to include in order to get system() to work?
    stdlib.h

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5
    Megatron
    Guest

    Re: clrscr()

    Originally posted by craig_phillips2
    why is it that in some versions of conio.h, there is the clrscr() function.
    clrscr is not included in all versions of C++, because it's not part of the ANSI C++ standard

Posting Permissions

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



Click Here to Expand Forum to Full Width