宿題、手伝おっか?
■ このスレッドは過去ログ倉庫に格納されています
0313えれな
NGNG>312 こうかな?car*で扱う必要性はないんだけど‥‥
typedef std::vector<car*> carArray;
carArray input(void)
{
int loop=0;
cout <<"Car#?"
cin >> loop ;
carArray arr;
for( int i=0; i<loop; i++)
{
car * ps = new car;
cout << "Please enter the make: ";
cin.get(ps->make, 20);
cout << "Please enter the year made: ";
cin >> ps->year;
arr.push_back( ps )
}
return arr;
}
■ このスレッドは過去ログ倉庫に格納されています