Sign in to follow this  
ilavos

ms vc++ help

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

#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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this