c++ dynamical array in class -
I am programming a hotel program that includes an array
// the size of the array of rooms The number is that in the hotel
// array [i] in the room are people I max 3 people
everything works perfectly (constructor, copy maker, destructor) I It prints the print (this array prints the material) -
As long as I have a few numbers from that position function (defined in the class) Automatically loads Arty content with!
Zero position (const Hotel & O) {for (int i = 0; i & lt; o monoform; i ++) {if (ORRPSE = I) = 0 ) COAT & LT; & Lt; "Room Number" & lt; & Lt; I & lt; & Lt; "Available" & lt; & Lt; Endl; And cout & lt; & Lt; "Room Number" & lt; & Lt; I & lt; & Lt; "Unavailable" & lt; & Lt; Endl; }} Print all rooms are unavailable! Who is: D
change
if (o.arapper [I] == 0); // You are using assignment '=' instead of '=='
Comments
Post a Comment