Hello World

Sep 3, 2013 at 4:57pm
Ok i really need help , im a beginner at c++ in college and learning the basics
Im using the right types of code on Visual C++ but every time i place a message in " cout << "My girl got a new car"; " my output says saying "Hello World!" and it's really pissing me off. how can i change my output????


1
2
3
4
5
6
7
8
9
10
 #include <iostream>

 using namespace std;

int main ()
{

   cout << "My girl got a new car";
   return 0;
}
Last edited on Sep 3, 2013 at 4:58pm
Sep 3, 2013 at 4:59pm
Recompile...
Sep 3, 2013 at 5:01pm
You have to recompile it and rerun it each time you change something, and if you have multiple main files (programs) tabbed, make sure you are running the correct one with the corresponding output.
Last edited on Sep 3, 2013 at 5:02pm
Sep 3, 2013 at 5:02pm
How??
Sep 3, 2013 at 5:02pm
Sep 3, 2013 at 5:04pm
I don't know about how to do stuff like that in Windoze, sorry. I could tell you
g++ -Wall -o car_girl hello.cpp

if you were in linux.
Last edited on Sep 3, 2013 at 5:04pm
Sep 3, 2013 at 5:04pm
Build > Build Solution
Sep 3, 2013 at 5:04pm
I think you simply added this new source file for an already existent project that contains its own main function.
You should create a new project.
Last edited on Sep 3, 2013 at 5:05pm
Sep 3, 2013 at 5:05pm
I try to stay away from Windows products. But each IDE (integrated development environment) has its own configuration and process. Google it.
Last edited on Sep 3, 2013 at 5:06pm
Sep 3, 2013 at 5:12pm
Credit to Smac89 on the general thread copy of this post:
http://lmgtfy.com/?q=how+to+compile+c%2B%2B+program+in+visual+studio
Sep 3, 2013 at 5:16pm
yeah best way is to just shut down the program and open it again. for some reason it keeps the old values you put in, close and reopen
Sep 3, 2013 at 5:21pm
OK I got it Thanks alot guys!
Topic archived. No new replies allowed.