두 클래스를 이용해서 벡터 채워 넣는 방법..
글쓴이: 김밥 / 작성시간: 금, 2017/04/14 - 9:55오후
#include <iostream>
#include <vector>
using namespace std;
class order;
class IceCreamSundae
{
private:
int flavor;
int size;
int toping;
public:
void getInformation(int a, int b, int c)
{
flavor = a;
size = b;
toping = c;
}
};
class order
{
private:
vector<IceCreamSundae> customer;
public:
void FillVector(int a, int b, int c)
{
customer.push_back()
}
};안녕하세요.. c++ 이제 막 입문하게 되었는데요... 위에 처럼 두 클래스가 있고 order 클래스 안에 FillVector
함수로 IceCreamSundae타입 벡터를 채워야하는데.. customer.push_back() 이 코드에서 괄호 안을 어떻게 채워
넣어야하는지 모르겠습니다.. 도와주세요..ㅠㅠ
Forums:


댓글 달기