+ 3
Its not recognizing iostream.h ,conio.h ,clrscr() , getch(). Why???
6 ответов
+ 4
And here is a simple replacement list :
iostream.h -> iostream
conio.h -> cstdlib
//Will not give you getch etc, but something similar...
Now, the functions:
clrscr() -> system("cls")
//system("clear") in linux; this uses cstdlib...
getch() -> cin.get()
//Requires pressing enter after the key as well...
Here is a way to use the old functions :
#define getch() cin.get()
#define clrscr() system("cls")
//Don't put semicolons here, or they will translate to this:
/*
#define hello() cout<<"Hello";
main()
{
hello() //cout<<"Hello";
hello(); //cout<<"Hello";; - and notice the dual semicolons...
}
*/
+ 5
You don't have to include .h in header file(s)
and
clrscr(), getch() are not required as you are not using Turbo C++ 😂😂
+ 5
:( more widespread problem than I thought. I deleted my comment because I felt it may be considered rude. I did not intend it to be though.
+ 3
oh god, that's what my prof taught in earlier semesters, using clrscr(), getch() and something like that. @jay @TakshakSH
+ 2
Please read here why:
members.gamedev.net/sicrane/articles/iostream.html
/*
Please, its 2017...
Why do people wish to remain in the past?
Then they complain - Is C++ dying?, C++ is not so useful, C++ can't help achieve things, etc. etc...
*/