-
October 13th, 2013, 03:28 PM
#1
a very special loop
Hi !
The syntax :
for ( const Class* c : *this )
{
...
};
Seems not to be compatible within VS2010.
How can I rewrite it ?
Thanks
-
October 13th, 2013, 04:48 PM
#2
Re: a very special loop
That is the new for loop syntax introduced in ANSI C++ 2011 standard.
http://en.wikipedia.org/wiki/C%2B%2B...based_for_loop
Why not just get VS 2012? If that line is in the code, wouldn't you think that there are more C++ 11 syntax that may occur in other places in the code? If you look at the link above, there are far more changes and enhancements to the language where attempting to rewrite the code to support old syntax may introduce bugs. I don't think, for example, you want to rewrite a complex lambda expression.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; October 13th, 2013 at 04:53 PM.
-
October 13th, 2013, 05:08 PM
#3
Re: a very special loop
Thanks for the name of this new beast ... I'll take a look
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|