c++ - What is the difference between "length" and "size" of a sequence? -
I am currently facing C ++ stack problems and I have trouble understanding the meaning of these two instructions. is. Can anyone tell me what is the length and size of the difference in this context?
Read the sequence of positive integers from the keyboard, one more per line, by any negative integer;After a line with the length of the sequence, produce a blank line, followed by the value in a row sequence with the amount, After another blank line; You must use the stack size function to determine the size of the sequence;
Here it means what I think:
2 / A sequence?
3 / second sequence?
4 // Third Sequence?
The length of the sequence: 3?
Total: 9
Pile Size: 3 ??? // Stack size is not just the order size? IMHO, gives you the ; For in (or I think the assignment is very clear, but perhaps your ability to read; Can understand plain english improve? std :: stack & lt; Should integers read in int & gt? while or - while ) ends with a negative input Loop After this, you will print the length = the length of the sequence (number of elements) given by std :: stack :: size () and stdout at the stdout and next to the amount, which you can use Can calculate std functionality.
Comments
Post a Comment