Hi I am trying to create a simple hello world program and its not working.
here is what i do
i create a empty project and name it "hello"
then I right click on the progect icon and go to ADD > Class > C++ > C++ Class
the window pops up and I enter the class name "HelloWorld" while I am doing this the ".h file:" and ".cpp file:" auto file with the same name and their own extentions. Thats all i do and then I click "Finish"
I right click on "hello" > ADD > New Item... > Code > C++ File (.cpp)
give it a name like "hello2"
enter the code
#include<isotream.h>
using namespace std;
int main()
{ cout<<"hello";
return(0);
}
I save the file
and then when I try to run it "F5"
I get this error
http://www.uri.edu/personal/mafd6225/1.JPG
http://www.uri.edu/personal/mafd6225/2.JPG
http://www.uri.edu/personal/mafd6225/3.JPG
can someone please help me

Trouble making simple program.
TilakGopi
{
std::cout<<
"hello"; return(0);}
i did all i could and now im getting the same error
here is the log
1>------ Build started: Project: test3, Configuration: Debug Win32 ------
1>Linking...
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
1>Debug\test3.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\1\My Documents\Visual Studio 2005\Projects\test3\test3\Debug\BuildLog.htm"
1>test3 - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
someone said im making a windows application im not sure what that means im very new to this stuff can someone please please give me step by step instrutions how to make a c++ project
like hello world.
Eduardo Martinez
Here are the steps I use:
Open the IDE
Click on File.New.Project
Select Win32 Console Application and give it a name: say "Hello"
Click OK and then click Finish
Once the Solution Explorer appears vlick on the main source file: if you named the Solution "Hello" this file will be called hello.cpp. The source file should appear something like what is shown below:
// First.cpp : Defines the entry point for the console application.
#include "stdafx.h"//
int
_tmain(int argc, _TCHAR* argv[]){
return 0;
}
Add the following source code to the _tmain function (don't worry that it is _tmain and not main).
std::cout << "Hello World" << std::endl;
Now open the stdafx.h file and add the following line
#include <iostream>
The build your project. It should build cleanly and you will then be able to execute the resulting application.
DrMicrochip
The include needs to be:
#include <iostream>
And the compiler error (in the output window) should have indicated you that the header "isotream.h"does not exist.
Ronald Laeremans
Visual C++ team
hypershot
but now im running into a different problem when i executed the program, the output window comes and goes really fast, it does not say on. it like blinks on then it closes.
how can i fix that
PaulC1234
ShaunWilks
Something simple to pause your application while it is executing will leave the window open long enough for you to see the contents of the window.
Try adding the following code inside your tmain just before the closing bracket. The last three lines of your tmain should be:
// pause after executing console application
fprintf( stdout, "\n\nHit any key to exit...\n");
fgetchar();
return 0;
Mark Panarusky
The second message is because the compilation failed and the project system is suggesting that you might want to execute the program which resulted from the last successful compilation.
The third message is because there wasn't a previously successful compilation and so there is no program to execute.
You should take a look at the build errors that were generated, fix them and then try to rebuild the program.