View Single Post
Old 09-27-2005, 04:13 PM   #8 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,709
redhead is on a distinguished road
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.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote