I'm trying to create a "inventory selection" type of thing, but I'm having trouble integrating the functions for each of the separate packs without problems. The functions are left empty on purpose.
# include <iostream>
# include <string>
# include <vector>
usingnamespace std;
string intro();
string selection();
string huntingPack();
int main()
{
intro();
}
// the introduction part of the program ties to everything else so far.
string intro()
{
string answer;
cout << "Would you like to begin, agent?<y/n>" << endl;
cin >> answer;
if (answer == "y")
{
selection();
}
return 0;
}
// creating a seperate function for the selection part of the program
string selection()
{
string selection;
cout << " this is the selection of backpacks you can use." << endl;
vector<string>inventory;
inventory.push_back("hunting pack");
inventory.push_back("electronics pack");
inventory.push_back("casual wear pack");
inventory.push_back("sling pack");
vector<string>::iterator selec1;
vector<string>::const_iterator iter;
for(iter = inventory.begin(); iter != inventory.end(); ++iter)
{
cout << *iter << endl;
}
cout << " select a pack (enter 'help' for more info)" << endl;
cin >> selection;
if(selection == )
{
huntingPack();
}
return 0;
if(selection == "Help")
{
cout << "[ Making a selection]" << endl;
}
}
// making an array for the attributes of the pack, as well as the picking stuff out part.
string huntingPack()
{
}
string electronicsPack()
{
}