I have to store names, ask for a users input name, add it to the stored list, display it, then remove a name from the list and display it. So far I have done this in an array. Can it be done in an array or does it have to be made in a vector instead? Here is my code. Please ignore the part about age, that is something I have to use after I finish the displaying of the lists.
#include <iostream>
#include<string>
using namespace std;
int main()
{
string last;
int age;
cout << "Please enter your last name: ";
cin >> last;
cout << "Please enter your age: ";
cin >> age;
java and c++ share a lot of similarities. It sounds to me like what you want to use is called a linked list of strings. I'd start by reading about linked lists in c++. I'm still a noob though, but it would make sense to me.
Also "print" is proper terminology if your talking about outputting to the terminal. Make sure you #include<isostream> and use cout to "print" as you say.