Hello I am reading a piece of code, and it contains a for loop that is not what I am used to seeing (that basic for loop format) and I am hoping someone could help me understand it. The code is below. Is the string temp the initalisation part of the for loop, and the cin >> temp the incrementation part? or would the be the conditional part of a for loop?
I have pasted all the code under the for loop just incase that is needed to be seen.
string temp initialisation statement (a simple declaration here)
cin>>temp condition (expression which is contextually convertible to bool)
evaluated before each iteration; if the result is false ( ie. if cin>>temp failed ), exit the loop