Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Problem with "for each" coloring
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mbobka
Ketchup Master

Russia
86 Posts

Posted - Jun 29 2006 :  12:32:03 AM  Show Profile  Reply with Quote

#include <vector>
#include <string>

void A() {
    std::vector<std::string> the_vector;

    for each( std::string row in the_vector ) {
        // do something
    }
}


For me "row" variable is colored as type/class but must be colored as variable.

VS2005. C++. VAX 1525.

jpizzi
Tomato Guru

USA
642 Posts

Posted - Jun 29 2006 :  12:51:07 AM  Show Profile  Reply with Quote
Unless I am missing something here, this is not valid C++ (did MS add that much to the language????)

(edit)
I guess I am going to have to re-learn C++, or stop using VS. This compiles

(edit2)
AHA! It is C++/CLR. Anyway, for me it is colored as a keyword.

case=1507

Joe Pizzi

Edited by - jpizzi on Jun 29 2006 01:02:07 AM
Go to Top of Page

mbobka
Ketchup Master

Russia
86 Posts

Posted - Jun 29 2006 :  03:46:36 AM  Show Profile  Reply with Quote
No, no! It for plain C++ and for CLR C++.
It's new feature specially implemented in plain C++ for iterating through STL containers.

Edited by - mbobka on Jun 29 2006 03:52:44 AM
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Jun 29 2006 :  9:45:30 PM  Show Profile  Reply with Quote
http://msdn2.microsoft.com/en-us/library/ms177202.aspx

Note down toward the bottom:

Requirements
Compiler option: /clr


Joe Pizzi
Go to Top of Page

mbobka
Ketchup Master

Russia
86 Posts

Posted - Jun 29 2006 :  11:57:52 PM  Show Profile  Reply with Quote
http://msdn2.microsoft.com/en-us/library/ms177203.aspx
// for_each_stl.cpp
// compile with: /EHsc

No /clr needed :P
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jul 09 2006 :  1:36:15 PM  Show Profile  Reply with Quote
Fixed in 1530.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000