📄 cstring.h
字号:
// CString.h header file for String classs#ifndef _IOSTREAM_H#include <iostream.h>#endifconst char NULLC = '\0';const int MAX = 80;class String { public: String(); // simple constructor String (char []); // literal constructor String operator= (String); // assignment by String operator char* (); // outward cast conversion int Atoi (); // converts text to int float Atof (); // converts text to float int Length (); // returns length of string String Substr (int, int); // substring copy int Contains (String); // position of substring int operator== (String); int operator!= (String); // Strings and literals... int operator<= (String); int operator>= (String); int operator< (String); int operator> (String); String operator+ (String); // concatenation char Onechar (int); // return a single character void Onechar (int, char); // replace a single character void InputStr (istream&); // input function void OutputStr (ostream&); // output function private: char cells[MAX]; };// prototypes for overloaded >> and << I/O operators istream& operator>> (istream& in, String& a); ostream& operator<< (ostream& out, String a);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -