Quote:
|
One question, what is the std:: for? another way to use the c standard lib?
|
It is to specify that it is the std namespace equivalent definitions beeing used.
You could also achieve it by having a line saying
Code:
using namespace std;
then you wouldn't need the std::, but for portable code and ANSI C++ restrictions it is better to use std:: infront of the standard declared definitions.
The i isn't reinitialized, it is only defined within the loop. thus it needs to be redefined in the next loop. It is standard ISO/ANSI C++ usage, only to define variables when they are needed.