목록전체 글 (53)
Typing diary
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566#include #include using namespace std; class Player{ string name;public: void setname(); string getname() { return name; }}; void Player::setname(){ cout > name;} class WordGame{ Player *player; int playerNum; string after, before;public: WordGame() { after = "아버지"; } void r..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 #include #include using namespace std; class Date { int Year, Month, Day; public: Date(int year, int month, int day) { Year = year; Month = month; Day = day; } Date(string date); void show(); int getYear() { return Year; } int getMonth() { return Month; ..
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647#include #include #include using namespace std; class Random{public: Random(); int next(); int nextInRange(int fir,int sec);}; int main(void){ Random r; cout
12345678910111213141516171819#include using namespace std; class exc{public: exc() {} // 기본 생상자를 만들어 주자 exc(int a) {}}; int main(){ exc a[10]; //객체 배열 선언문은 반드시 기본 생성자를 호출한다! //exc c[10](3); ->구문 오류 exc b[3] = { exc(1), exc(2), exc() }; // 객체 배열 초기화 } Colored by Color Scriptercs