Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs

Partner Sites
JustLinux.com
Linux Planet
PHPBuilder
Technology Jobs

Top White Papers

More on LinuxToday


Overcoming the "Most Vexing Parse" Problem

Oct 15, 2009, 21:33 (1 Talkback[s])

"The C++ literature uses the phrase "most vexing parse" to denote one of the dark syntactic alleys of C++. It's vexing because programmers usually don't even know it exists; they assume that their code creates an object initialized with a temporary, whereas the compiler interprets that same code as no less than a function declaration. This 10-Minute Solution explains where and why that parse problem happens, and presents two simple techniques to avert it.

"You define an object whose initializer is a temporary, but the compiler unexpectedly interprets the code as a function declaration.

"Rewrite your code so that it avoids the most vexing parse problem."

Complete Story

Related Stories: