Reputation: 4739
I opened hello.cpp. Why isn't there File -> Compile -> hello.cpp? What is an other easy way, if any?
Upvotes: 1
Views: 338
Reputation:
Or, you could use something like notepad++ and write a script that compiles with the windows 7/Visual studio C++ compile (CL.exe). That could work as well and do what you describe. C++ was meant for medium and large size projects that require performance and space efficiency. If you want to practice you could use the method I described but otherwise I'd recommend using something like Python/Java/PHP/etc to crank out applications that can take the performance hit of an interpreted/JIT compiled language. This will allow you to develop at a rapid pace. I prefer C++ myself but I use the approach very frequently.
Upvotes: 1
Reputation: 23138
The file must be part of a project before you can compile/build it. Starting with VS 2005 (or maybe 2008), you can use File -> New -> Project From Existing Code to wrap a project around source files.
Upvotes: 2
Reputation: 190945
The best way its to create an empty project add your hello.cpp
then Visual Studio will build your program.
Upvotes: 0