VS2008 C++ "The system cannot find the file specified"

Running a usual

#include <iostream>

using namespace std;

void main
{
cout << "hello world";
}

Nothing in header files, resource files and nothing in Linker, output file.

Having a hard time getting OpenGL to run but it seems even basic C++ files aren't running. I'm using VS2008 professional on Windows 7.

There's no .exe in the Debug folder. Making projects with other languages works fine.

"Error 1 error C2470: 'main' : looks like a function definition, but there is no parameter list; skipping apparent body <path>"


Added brackets after main() and it now works, however I'm still having trouble getting OpenGL to work.
Last edited on
Try
int main()

Might help :D Main is a function, you need parentheses. And void is not standards compliant, so don't do that.
And if you're just beginning in C++, check out the tutorial.
http://www.cplusplus.com/doc/tutorial/
Added brackets after main() and it now works, however I'm still having trouble getting OpenGL to work.


Be sure the Project adds the OpenGL libraries: opengl32.lib, glu32.lib and maybe glaux.lib.

http://content.gpwiki.org/index.php/OpenGL:Tutorials:Windows_Setup

NeHe's Site (used to be much better than it is nowadays, sigh): http://nehe.gamedev.net/

http://www.gamedev.net/page/index.html
Topic archived. No new replies allowed.