Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 02-27-2004, 11:02 AM   #1
Baseband Member
 
pemorej's Avatar
 
Join Date: Feb 2004
Posts: 30
Default clrscr() in visual c++

i want to use clrscr() in visual c++ but it wont work. the error is "undeclared variable". does this mean that ihave to declare the clrscr? it doesnt make sense.
__________________

pemorej is offline   Reply With Quote
Old 02-27-2004, 07:29 PM   #2
Guru
 
Lord Kalthorn's Avatar
 
Join Date: Dec 2003
Location: Britain
Posts: 13,293
Send a message via MSN to Lord Kalthorn
Default

Now, I don't know anything about C++! And I don't know how variables are introduced to C++; although I intend to learn. However, are Variables not displayed as 'Var'?

Either way, clrscr(), doesn't sound like a Variable - maybe you need a variable to control the clrscr()?
__________________

__________________
A Knight is sworn to Honour. His heart knows only Virtue. His blade defends the helpless. His might upholds the Weak. His word speaks only truth. His wrath undoes the Wicked.
Lord Kalthorn is offline   Reply With Quote
Old 02-28-2004, 04:04 AM   #3
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default Re: clrscr() in visual c++

Yes, It looks like you would need to declare it. Try that and let us know what happens.
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 04-08-2004, 02:45 AM   #4
Beta Member
 
Join Date: Nov 2003
Posts: 1
Send a message via Yahoo to peppo
Default Re: clrscr() in visual c++

unfortunately clrscr() function is located in conio.h header file and conio.h was created by Borland. (In Dev C++ help .. u saw this). I don't know witch version of Visual c++ you have but try this :

#include <conio.h>
If this doesn't work try :
#include <conio.h>
#include <conio.c>

//Please note thet you must have this files in your Include folder (you can find Include folder in your VC++ instalation folder)
peppo is offline   Reply With Quote
Old 04-08-2004, 10:53 AM   #5
Beta Member
 
Join Date: Apr 2004
Posts: 1
Wink Simple

Well if u have included iostream and u are using namspace u can do it simple

sysyem("cls");

or by including stdlib and then doing same sysyem("cls");
neomxp is offline   Reply With Quote
Old 04-08-2004, 07:54 PM   #6
Baseband Member
 
Join Date: Feb 2004
Posts: 32
Send a message via AIM to Traveller
Default Re: clrscr() in visual c++

just quick correction to ensure typo doesn't confuse anyone:
system("cls");
__________________

Traveller is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 04:12 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0