void addItem(itemInfo itemList[], int listSize);
int main()
{
ifstream inDatabase;
ofstream outDatabase;
inDatabase.open("itemDatabase.txt");
outDatabase.open("itemDatabase.txt");
struct itemInfo;
int choice;
string item;
itemInfo itemList [Name_Of_Item]; // I have having problems with this line.
showMenu();
cout << "Enter Number: ";
cin >> choice;
switch (choice)
{
case 1:
addItem(itemList, Name_Of_Item);
break;
Okay, so where I mentioned that I am having a problem...
The "Name_Of_Item" is underlined in Red.
It keeps saying, "Use of undeclared identifier "Name_Of_Item""
What do I do? I finally got the other errors to disappear.
"Name_Of_Item" was never declared, which is why your having errors. Because your declaring an array, the compiler will want you to put a number there, indicating the size of the array. Just replace "Name_Of_Item" everywhere you use it with a number of your choice.