Image

Imagejizmunci wrote in Imagecpp

help?

I am new to this. I am getting :
lab2new.cpp: In function `int main()':
lab2new.cpp:272: error: expected primary-expression before "else"
lab2new.cpp:272: error: expected `;' before "else"
lab2new.cpp:280: error: expected primary-expression before "else"
lab2new.cpp:280: error: expected `;' before "else"

for this section of code. Could somebody explain it to me? There is a few hundred lines of very similar code in the program that is compiling fine.

264 else
265 {
266 if (instcount == 3)
267 i3="clar" ;
268 getinfo ( i, deposit );
269 dep3 = deposit ;
270 cout << " The deposit for renting this instrument is "
<< dep3 << endl ;
271 }
272 else
273 if (instcount == 4)
274 {
275 i4="clar";
276 getinfo ( i, deposit );
277 dep4 = deposit ;
278 cout << " The deposit for renting this instrument is "
<< dep4 << endl ;
279 }
280 else
281 if (instcount == 5)
282 {
283 i5="clar" ;
:set number