Please help me in C++ simple program
Code:
#include<iostream>
using namespace std;
int main()
{
cout <<"sonia";
return 0;
}
I want to run this simple C++ program. I am getting error Unable to unclude file 'iostream'.
I have gone thru all the options:-
1) Tools-->Directories-->Check Include Path
& many more that i searched on internet.
Please HELP ME!!!!!!
Re: Please help me in C++ simple program
What os/compiler are you using? Have you used ansi c++ header files before? Try
Code:
#include <iostream.h>
if this works then the compiler you are using is not ansi c++ compliant.
Re: Please help me in C++ simple program
Re: Please help me in C++ simple program
I have downloaded DEV C++. I try to write the simple programm
Code:
#include<iostream.h>
int main()
{
cout<<"sonia";
return 0;
}
It is running without any errors. But when I run it, OUTPUT screen doesn't come.
I don;t understand there is no need of line
Code:
using namespace std;
in DEV C++??? Code is different for compilers???
Re: Please help me in C++ simple program
You are not using ansi c++ which is now the standard. You are using a version of c++ from prior to about 1998 before the ansi c++ standard was formalised. This code
Code:
#include<iostream.h>
int main()
{
cout<<"sonia";
return 0;
}
is not ansi c++ and would not compile using current compilers. I would strongly suggest you change your compiler to a more up-to-date one that conforms to ansi c++ standard. The current version is c++11. You are likely to come across these compatibility issues again using dev c++.
What os are you using? For Windows I would suggest Visual c++ express which is free.
From where are you learning c++? I would suggest you have a look at
http://www.learncpp.com/
http://www.cplusplus.com/doc/tutorial/
http://www.tutorialspoint.com/cplusplus/index.htm
Re: Please help me in C++ simple program
2Kaud very thanks for the reply!!! I will download Visual C++ express and will work on it!!! I am using Windows 7.
I want to ask one more thing, to download Visual C++ express, I need to download the whole Visual Studio or just downloading Visual C++ express will work?
Re: Please help me in C++ simple program
This is the link to download the various versions of Visual Studio 2013. You need Visual Studio Express 2013 for Windows Desktop. Once installed, you will need to register but there is no charge.
http://www.visualstudio.com/en-us/do...R_CC=200323803
As far as I know there is now just Visual Studio which contains c++.
Have fun! :)
Note that for c++ questions there is a more active companion forum at
http://forums.codeguru.com/forum.php
(although you will need to register again).
1 Attachment(s)
Re: Please help me in C++ simple program
I have click on Microsoft Visual Studio Express 2013 for windows desktop.
After clicking I have two options,see in IMAGE ATTACHED. I have chosen the first one.
After clicking the first option, Further two options are there:-
1) Express 2013 for Windows Desktop
2) Ultimate 2013
I download the first one.
When i started Installation, Set up Blocked.
Message come :-
This Version of visual studio requires a computer with a newer version of windows.
But I have Already Windows 7 on my lapi, Then y set is asking for newer version??
Re: Please help me in C++ simple program
When I installed it on my Windows 7 laptop, I used the 2nd option and downloaded the DVD ISO image which I then burnt to a DVD. I then used this DVD to install successfully under Windows 7. I haven't used the first option. Is your Windows 7 installation fully patched with SP1 and all the latest hotfixes? VS 2013 requires SP1 for Windows 7 to be installed before VS2013 can be installed.
See installation requirements here http://www.visualstudio.com/en-us/pr...dio-express-vs
Re: Please help me in C++ simple program
Thanks for the reply!!! On clicking the 2nd option, Further two options are there:-
1)Express 2013 for windows desktop
2) Ultimate 2013
WHICH OPTION TO CHOOSE?
Re: Please help me in C++ simple program
Only option 1 - Express 2013 for windows desktop is free!
Re: Please help me in C++ simple program
O my God, Express 2013 is 790 MB uff!!!!!!!!!!
Re: Please help me in C++ simple program
Which is why it requires a DVD. If it was 700 MB or less it would have fit on a CD.
Of course, you could look at like... Wow, I get 790 MB of programming tools, and compilers and all for Free.
Aren't you glad you didn't have to see how large Ultimate 2013 was.