CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

Using strings with <iostream>

You can use the same kind of strings that you have in francast.h and franca.h

You must include <cstring.h> in your program.

Example:

#include <cstring.h>

#include <iostream.h>

void main()

{

    string lastname,firstname,name;

    lastname="Newman";

    firstname="Alfred";

    name=firstname+" "+lastname;

    cout<<name;

}