C++ Lecture 4

[Previous Lecture] [Lecture Index] [Next Lecture]

Intro to Standard String Class

// Defines class string { ... };
#include <std/string.h>
#include <std/string.h>
int
main()
{
    string s, t;

    t = "hi";
    t.append(" there");
    cin >> s;
    cout << t << ' ' << s << endl;

    return 0;
}

More on Standard String Class


[Previous Lecture] [Lecture Index] [Next Lecture]