Connecting Tech Pros Worldwide Forums | Help | Site Map

Re: Test for learners

Juha Nieminen
Guest
 
Posts: n/a
#1: Sep 5 '08
Stefan Ram wrote:
Quote:
2.) When you want to test whether something is a statement
within a correct program, put a pair of braces around it.
If it is a statement, the program will still be correct
and the behavior of the program will not change.
int i = 5; // Is this a statement?
std::cout << i << "\n";

Let's test:

{ int i = 5; }
std::cout << i << "\n";

I suppose it isn't. Then what is it?

Closed Thread