[Dev-C++] Question using "main" as a variable name
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: DC A <ad...@ho...> - 2008-04-07 17:53:09
|
I am trying to learn c++ by reading a book named "C++ Primer Plus". In that book author made a statement that when writing a program that has a main function defined can also have a variable named "main". "You can use "main" as a variable name. This can cause a problem in circumstances too esoteric to describe here." So in a program that has a main() function can also have a variable named main. But what can be the circumstance in which it can cause problem? Can anyone kindly shed light into this? I can't think of anything. Thanks. _________________________________________________________________ Enter today for your chance to win $1000 a day—today until May 12th. Learn more at SignInAndWIN.ca http://g.msn.ca/ca55/215 |