clearing text
I recently switched from a Turbo compiler to a Visual C++ one. A program I wrote in Turbo that compiled just fine won''t compile in Visual. There is just one problem: it has a problem with the following line:
clrscr();
Does Visual not like clrscr() or am I missing some code I''m supposed to include that Turbo didn''t need? If Visual for some reason doesn''t like clrscr(), what am I supposed to use to clear the screen and move on to the next segment of text? If I don''t clear it, the screen will look very cluttered. This one''s been bothering me for a couple weeks.
I think you can use system("CLS"); instead of clrscr().
/. Muzzafarath
Visit my website, Mad House Software
Edited by - Muzzafarath on May 22, 2000 1:49:58 PM
/. Muzzafarath
Visit my website, Mad House Software
Edited by - Muzzafarath on May 22, 2000 1:49:58 PM
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
The difference between Turbo and VC is: Turbo is Dos (at least the one your describing), and VC is windows. Clrscr() ; in a text mode operation. Although it should work if you''re in a DOS mode window when you compile, there''s a fancy C++ way to do it using cout and endl but hell i like printf so dont ask me .
As long as your including stdio.h it should work fine... or was that conio.h? I think it was conio.h
40
www.databyss.com
www.omlettesoft.com
"Don''t meddle in the affairs of wizards, for they are subtle and quick to anger."
40
www.databyss.com
www.omlettesoft.com
"Don''t meddle in the affairs of wizards, for they are subtle and quick to anger."
-40
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement