Jump to content
  • Advertisement
Sign in to follow this  
ilavos

ms vc++ help

This topic is 5094 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok.explain this to me like you would to a 12 year old,how on god green earth do i make a c++ program run with this fu.... thing??It keeps giving me error signals,even a simple cout >>" hello"; isnt working.Step by step strait for the dummies type tutorial needed here.

Share this post


Link to post
Share on other sites
Advertisement

#include <iostream.h>

void main(){

cout << "Hello World\n";

}




>> only works when using cin, ie:

cin >> variable;

Edit: the "cout" and "cin" functions are just 2 of the many functions defined in the header file "iostream.h".

Share this post


Link to post
Share on other sites
Further to what Wavarian has said, you will need to create a project first. The simplest project to start with is a "Win32 Console Application".

Share this post


Link to post
Share on other sites
Get rid of the .h on the end of iostream

then do

#include <iostream>

int main() {
std::cout << "Hello World";
return 0;
}

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
an alternative when using iostream (without the .h) to having to put std:: in front of all your cout and cin's is to do:

#include
using namespace std;

int main()
{
    cout << "Hello, World\n";
    return 0;
}

Share this post


Link to post
Share on other sites
an alternative when using iostream (without the .h) to having to put std:: in front of all your cout and cin's is to do:

#include <iostream>
using namespace std;

int main()
{
    cout << "Hello, World\n";
    return 0;
}

sorry, accidently double posted (and forgot to fill in my passwd the first time)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!