+ 3

Its not recognizing iostream.h ,conio.h ,clrscr() , getch(). Why???

9th Jun 2017, 3:24 AM
Hrishikesh Patil
7 odpowiedzi
+ 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... } */
13th Jun 2017, 11:11 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 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++ 😂😂
9th Jun 2017, 3:50 AM
TakshakSH
TakshakSH - avatar
+ 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.
9th Jun 2017, 4:13 AM
jay
jay - avatar
+ 3
oh god, that's what my prof taught in earlier semesters, using clrscr(), getch() and something like that. @jay @TakshakSH
9th Jun 2017, 4:00 AM
Steff
Steff - avatar
+ 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... */
13th Jun 2017, 11:01 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar