목차
11-1. C++ 표준 라이브러리
11-2 표준 string 클래스
11-3 사용자 정의 string 클래스
11-4 OOP 프로젝트 9 단계
11-2 표준 string 클래스
11-3 사용자 정의 string 클래스
11-4 OOP 프로젝트 9 단계
본문내용
using std::ostream;
using std::istream;
class string{
int len;
char* str;
public:
string(const char* s=NULL);
string(const string& s);
~string();
string& operator=(const string& s);
string& operator+=(const string& s);
bool operator==(const string& s);
string operator+(const string& s);
friend ostream& operator<<(ostream& os, const string& s);
friend istream& operator>>(istream& is, string& s);
};
using std::istream;
class string{
int len;
char* str;
public:
string(const char* s=NULL);
string(const string& s);
~string();
string& operator=(const string& s);
string& operator+=(const string& s);
bool operator==(const string& s);
string operator+(const string& s);
friend ostream& operator<<(ostream& os, const string& s);
friend istream& operator>>(istream& is, string& s);
};
소개글