CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2013

    a very special loop

    Hi !

    The syntax :

    for ( const Class* c : *this )

    Seems not to be compatible within VS2010.
    How can I rewrite it ?


  2. #2
    Join Date
    Apr 1999

    Re: a very special loop

    That is the new for loop syntax introduced in ANSI C++ 2011 standard.

    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.


    Paul McKenzie
    Last edited by Paul McKenzie; October 13th, 2013 at 04:53 PM.

  3. #3
    Join Date
    Jan 2013

    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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.