?? string.h
字號:
#ifndef _String_H
#define _String_H
#define MAX_STRING 200
#include <iostream>
class String
{
public:
String();
String(const char* astr);
String(const String& astr);
String(const char ch, int num = 1);
String(int num);
String& operator=(const String& astr);
String& operator=(const char ch);
~String();
String& operator+=(const String& astr);
bool operator==(const String& astr) const;
bool operator!=(const String& astr) const;
char getChar(int i);
bool empty() const;
int getlenth() const;
int reGetlenth();
int find(char ch) const;
String getSub(int beg, int end);
void Set(int len);
int intoInt();
double intoDouble();
operator unsigned char*();
friend std::ostream& operator<<(std::ostream& out, const String& astr);
friend std::istream& operator>>(std::istream& in, String& astr);
private:
int lenth;
unsigned char* str;
};
String operator+(const String& lstr, const String& rstr);
String intoString(int i);
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -