DNWA/11/wywolania/Data/stide_v1.1/Utils/cstrings.h
Jakub Stefko ab1d7e2546 ...
2021-01-28 18:33:55 +01:00

17 lines
416 B
C++
Executable File

/*
This class implements strings. It is meant to offer all the functionality
of strings in C, so whenever a C function is needed that manipulates strings,
it must be coded into this.
*/
class String {
public:
String(void) {data = NULL; dsize = 0;}
String(char *init) {dsize = strlen(init); data = new char[dsize];}
~String(void) {if (dsize) delete data;}
private:
char *data;
int dsize;
};