uniquecount = 0; worked.
It still seems that the [x+1] would be accessing an array location that does not exist. But if it works, it doesn't matter, I guess, since it wouldn't cause wrong output.
uniquecount = 0; worked.
It still seems that the [x+1] would be accessing an array location that does not exist. But if it works, it doesn't matter, I guess, since it wouldn't cause wrong output.
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
198: parse error before `['Code:for (int q = 0; q < uniquecount; ++q) { for (int w = 0; w < BOOK_MAX; ++w) { if (Unique[q] == Books[w].Author) { cout << Books[w].Title << " in section " << Books[w].Category; for (int e = 0; e < BOOK_MAX; ++e) { if (Book[w].ID == Loans[e].Book) { cout << " - on Loan." << endl; } else { cout << " - in Stock." << endl; } } } } }
213: break statement not within loop or switch
214: confused by earlier errors, bailing out
Line 198 is the if statement.
I'm confused about break statement, because the switch statement it's in is within braces.
The switch starts and ends as follows:
Code:switch (select) { case 1: {I didn't have any errors before writing the code that starts at the point which I've pasted.Code:break; } case 2:
Last edited by Furious5k; 01-06-2009 at 10:32 AM.
You probably have an error elsewhere - what you have posted seems OK to me.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.