StrRef::operator =( char * )
Set a StrPtr
to reference an existing StrPtr
or null-terminated string.
Virtual? |
No |
|
Class |
||
Arguments |
|
the null-terminated string to reference. |
Returns |
|
Notes
The =
operator is equivalent to calling Set()
.
Example
Copy
#include <iostream>
#include <stdhdrs.h>
#include <strbuf.h>
int main( int argc, char **argv )
{
char chars[] = "xyz";
StrRef sr;
sr = chars;
cout << "chars[] = \"" << chars << "\"\n";
cout << "sr.Text() returns \"" << sr.Text() << "\"\n";
}
Executing the preceding code produces the following output:
chars[] = "xyz" sr.Text() returns "xyz"