system("cls") vs clrscr();
-
mardi 6 décembre 2011 10:32
when clrscr(); is function of conio.h which is used to clear the screen .. why it is not working in vc++ even though i've include that header file?
ans a similar question..
why std::cout or std::cin are used instead of just cout and cin?
We create the magic world
Toutes les réponses
-
mardi 6 décembre 2011 11:21
clrscr() is old stuff used in DOS. clrscr is not in conio.h anymore, atleast in VC2008/2010 if I remember correctly.
cin / cout are C++ stuff. Both are in the namespace std.
Her is an example on how to use cin / cout:
http://msdn.microsoft.com/en-us/library/6xwbdak2(v=vs.80).aspx
- Modifié BordonMicrosoft Community Contributor mardi 6 décembre 2011 11:22
- Marqué comme réponse Helen ZhaoModerator lundi 12 décembre 2011 08:37
-
mardi 6 décembre 2011 20:34
clrscr() was never in VC++, it is a function from the old
Borland - and now Embarcadero - compilers. It was/is usable
in both DOS and Win32 console programs built with those
compilers.
- Wayne- Marqué comme réponse Helen ZhaoModerator lundi 12 décembre 2011 08:37
-
jeudi 8 décembre 2011 18:09thank u guys
We create the magic world -
mercredi 25 juillet 2012 10:17
In Visual studio, I think you can use:
#include <stdlib.h>
void main()
{
system("cls");
.....
}
------
clrscr() instead of system("cls"),
and system("cls") into stdlib.h
- Modifié nguyenhuylinha1 mercredi 25 juillet 2012 10:19

