1
string firstname, lastname;
string phonenumber, email;
cout << "What is the first of the person that you would like to add? : ";
cin >> firstname;
cout << "What is the last of the person that you would like to add? : ";
cin >> lastname;
cout << firstname << " " << lastname << endl;
cout << "What is the phone number of that person? : ";
cin >> phonenumber;
我需要幫助獲取此用戶輸入並將其插入到數組中。我真的不知道該怎麼做,如果我能得到一些幫助,那會很棒!以用戶輸入並將其插入動態分配陣列,Beginner C++
'std :: vector'將幫助 –
ForceBru
[發現一個很好的初學者書](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list)並開始閱讀關於* structures *的內容,然後再開始思考「動態數組」。如果你有一本好書,那麼它也會解釋動態內存分配。 –
我明白如何使用具有固定值的數組,但我的教授告訴我,我們必須這樣做(對於編程任務),也使用結構體,我是否應該閱讀這些數組? –