KakaoTalk_20190606_001802318.png
  • 246x0w
Welcome
Curriculum
Install&Go
Board
실제 작동 상태를 확인하려면 라이브 사이트로 이동하세요.
  • 카테고리
  • 전체 게시물
  • 내 게시물
이재민
2020년 7월 16일

200716

게시판: 소스 코드 제출

/*

#include <iostream>


#include <string>



using namespace std;



class person


{


string name;


string tel;


public:


person();


string getname()


{


return name;


}


string gettel()


{


return tel;


}


void set(string name,string tel)


{


this->name=name;


this->tel=tel;


}


};



person::person()


{


this->name=name;


}



int main()


{


person s[3];



person *p;


char nm[4];


string name1;


p=s;


for (int i=0; i<3; i++)


{


string name;


string tel;


cin >> name >> tel;


p[i].set(name, tel);


}


for (int i=0; i<3; i++)


{

cout << p[i].getname() << endl;

}


cin >> name1;



for (int i=0; i<4; i++)

{

if (p[i].getname()==name1)

{

cout << p[i].gettel() << endl;

break;

}

}




}

*/















#include <iostream>

#include <string>0

using namespace std;


class ctn

{

int size;

public:

ctn()

{

size=10;

}

void fill();

void consume();

int getsize();

};


void ctn::consume()

{

size--;

}


void ctn::fill()

{

size=10;

}


int ctn::getsize()

{

return size;

}


class cvm

{

ctn tong[3];

void fill();

void se();

void sa();

void ss();

void show();

public:

void run();

};


void cvm::fill()

{

for (int i=0; i<3; i++)

{

}

cout << "10 " <<"10 " << "10" << endl;


}


void cvm::se()

{

tong[0]

tong[1]

cout << "ed" << endl;

}


void cvm::sa()

{

//tong[0]--;

//tong[1]-=2;

cout << "ad" << endl;

}


void cvm::ss()

{

// tong[0]--;

// tong[1]-=2;

// tong[2]--;

cout << "sd" << endl;

}


void cvm::run()

{

}


int main()

{

cvm s;

cvm *p=new cvm();

int a;


p->run();

while(1)

{

cin >> a;

if (a==4)

{

// p->show();

}

else if (a==1)

{

// p->se();

}

else if (a==2)

{

// p->sa();

}

else if (a==3)

{

// p->ss();

}

else if (a==5)

{

// p->fill();

}

}


}


댓글 0개
0
댓글
댓글 0개
유사 게시물
  • 200716
  • 200716
  • 200716
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호