[Tutor] scope/namespaces

Alan Gauld alan.gauld at btinternet.com
Tue Apr 24 22:12:50 CEST 2007

"Ben Sherman" <bensherman at gmail.com> wrote

> Am I wrong in my memory?  When I was a wee lad prior to 99 for 
> sure),
> I thought I would initialize my loops with:
> for (int x=0; x <10; x++) {

You certainly could in C++ but I'm less sure about C.
You certainly couldn't do that in C prior to ANSI C
(in 1991/2?). However I don't think the C++ bits got
incorporated into C until the C update in '99. However
that didn't stop some compilers supporting them.
For example the C++ // comment style was supported
by most ANSI compilers even though it wasn't in the
original ANSI standard.

> I am rapidly veering off topic.

Me too :-)

Alan G.
Who hasn't used vanilla C in anger for at least 10 years!
(And C++ for 4 or 5...)

More information about the Tutor mailing list