I dont know how i did it before, but i dont quite remember how to get started on a win 32 console program for Microsoft Visual 2010 ultimate edition.

could someone give a basic idea of where to start for a blank template?
I did:
New project,
Win 32 console app,
Empty template

and when i get in there it wants somethink like

#include "stdafx.h" //or some weird thing like that.

Error 1 error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include ""' to your source?

//this for example won't compile 

#include <iostream>
using namespace std;

int main()
cout << "This should work but it doesn't."
return 0;


sorry, i know this is a dumb question, but i tried a few diff configurations and i cannot figure this out

Recommended Answers

All 4 Replies

i think the problem is your project properties
try this:
File->New Project->Win 32 Console App
now, a window will pop up; DO NOT PRESS FINISH
Click next, make sure that the application type is 'Console application' and uncheck the 'Precompiled heather' box and check 'empty project' box

everything should be working now

Ok I can do that. But then I dont get a window to start typing code into. I have the sloution explorer and the error list. no big window to type code.

NVM i found it. sorry for the dumb question... under add, go to add c++ file (.cpp)
Took a little digging. but it wasnt too bad.

thanks for the guidance.

np, glad to help, happy coding ^^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.