Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Fish
- {
- string fishName;
- int tank;
- int quantity;
- double price;
- };
- void readInventory(Fish[], int, int);
- int main()
- {
- const int MAX_SIZE = 100;
- Fish myArray[MAX_SIZE];
- int choice;
- int currentSize = 0;
- readInventory(myArray, MAX_SIZE, currentSize);
- return 0;
- }
- void readInventory(Fish displayArray[], int maxArray, int arraySize)
- {
- cout << "readInventory" << endl;
- ifstream inputFile;
- inputFile.open("inventory.dat");
- int count = 0;
- while (count < maxArray && inputFile >> displayArray[count]) // This is the line with the Error:
- count++; // binary '>>' : no operator found which takes a right-hand
- // operand of type 'Fish' (or there is no acceptable
- // conversion)
- inputFile.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement