It shows error in the first line | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

It shows error in the first line

it shows error in d line #include.............. any reason nd solution ?

19th Apr 2017, 4:17 PM
naveen
naveen - avatar
16 Answers
+ 9
Which code are you talking about? Please show us the full code to help...
19th Apr 2017, 4:24 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 9
Well, Turbo C++ is a C++99 Edition compiler, and so make sure all your codes are like this: #include<iostream.h> #include<conio.h> void main() { clrscr(); cout<<"Hello World!"<<endl; getch(); } Also, don't use - using namespace std; or a header file without .h with the name...
19th Apr 2017, 4:39 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 9
Yes, then you must change your IDE to Code::Blocks... Download it here: http://sourceforge.net/projects/codeblocks/files/Binaries/16.01/Windows/codeblocks-16.01mingw-setup.exe
19th Apr 2017, 4:48 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 9
Did you install the exact setup from the link? I think the compiler may have got unchecked... In the end, did you get a dialog box showing GNU GCC Compiler as Detected? I suggest you uninstall this one, and reinstall the setup... This time, select full option when it shows default and a slider...
20th Apr 2017, 3:17 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 9
@naveen Please let me know if it starts working...
20th Apr 2017, 3:21 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 8
@naveen And one more thing In the folder where you installed Code::Blocks, check if the Mingw folder is there or not...
20th Apr 2017, 3:22 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 7
You're Welcome! ^_^
20th Apr 2017, 3:17 AM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 7
Then the compiler wasn't installed... Try reinstalling
20th Apr 2017, 3:51 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 1
installed code block but when i hit build and hit button it shows a error in log that the compilers setup is inavalid so code block cannot find run the compiler ..m what to do
20th Apr 2017, 3:11 PM
naveen
naveen - avatar
+ 1
i remember i selectd all option but ill do it once again
20th Apr 2017, 3:18 PM
naveen
naveen - avatar
+ 1
ya suree
20th Apr 2017, 3:22 PM
naveen
naveen - avatar
0
soryy but ots in d hello world program ... i used to work on anothrr compiler ago but now i am using turbo c++ nd it gives error in most of d codes ive tried several but most basic is in hello world
19th Apr 2017, 4:34 PM
naveen
naveen - avatar
0
ps i am a begginer
19th Apr 2017, 4:35 PM
naveen
naveen - avatar
0
well thats quite complicated for me because u knw i prsnly find codes with iostream easy plus internet is filld with those codes so is there any possible way codes witb iostream can run on my machine .. i mean by changing IDE nd compiler ?
19th Apr 2017, 4:41 PM
naveen
naveen - avatar
0
oh thanks a lot 😇
19th Apr 2017, 4:58 PM
naveen
naveen - avatar
0
ya i checkdd but there was no such folder
20th Apr 2017, 3:23 PM
naveen
naveen - avatar