1

I opened hello.cpp. Why isn't there File -> Compile -> hello.cpp? What is an other easy way, if any?

3
  • Delirium Tremems, I usually have one of those after an "Arrogant Bastard Ale" and wind up with a "Blithering Idiot." It just seems like a natural progression. Commented Jul 18, 2009 at 22:16
  • Duplicate: stackoverflow.com/questions/880803/… Commented Jul 18, 2009 at 22:33
  • Is there a way to Merge duplicate questions rather than just closing them? I mean it would make sense to do so. Commented Jul 19, 2009 at 0:13

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

It's kinda a pain in the ass if you're used to being able to just type gcc Hello.cpp. But overall it gives you a nice view graph of your application files, and classes.
1

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.

Comments

0

The best way its to create an empty project add your hello.cpp then Visual Studio will build your program.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.