Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Problem with "for each" coloring

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
mbobka Posted - Jun 29 2006 : 12:32:03 AM

#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.
5   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jul 09 2006 : 1:36:15 PM
Fixed in 1530.
mbobka Posted - Jun 29 2006 : 11:57:52 PM
http://msdn2.microsoft.com/en-us/library/ms177203.aspx
// for_each_stl.cpp
// compile with: /EHsc

No /clr needed :P
jpizzi Posted - Jun 29 2006 : 9:45:30 PM
http://msdn2.microsoft.com/en-us/library/ms177202.aspx

Note down toward the bottom:

Requirements
Compiler option: /clr

mbobka Posted - Jun 29 2006 : 03:46:36 AM
No, no! It for plain C++ and for CLR C++.
It's new feature specially implemented in plain C++ for iterating through STL containers.
jpizzi Posted - Jun 29 2006 : 12:51:07 AM
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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000