Crossware

Table of Contents        Previous topic       Next topic       

C++ COMPILER LIBRARY FUNCTIONS->String Class Functions->Member Functions->Assignment Operators

#include <string>

string& operator=(const string& str)

Replaces the data of an object of class string with the data of str.

Returns a reference to the string to which the data has been assigned.

string& operator=(const char* s)

Replaces the data of an object of class string by the array of char of length strlen(s) with a first element s.

Returns a reference to the string to which the data has been assigned.

string& operator=(char c)

Replaces the data of an object of class string by single char c.

Returns a reference to the string to which the data has been assigned.