Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

 2 Answer(s)

  • include string
    include iostream
    using namespace std;
    int main()
    {
        string str("Hello World!"); // Or string str = "Hello World!";
        cout << str << endl;
    }

    This code will create a string called "str', and put "Hello World!' into it. It is then being outputted to standard output by using cout.

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: