Re: Does MC++ have foreach?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks. It's amazing!

Carl Daniel [VC++ MVP] wrote:
Edward Yang wrote:

I am testing VS 2005 Express August CTP.

I am very thrilled by the fact that I can write code agaist the .NET
Framework (in new syntax). Now I have a question - I want to enumerate
all elements in a collection. In C# or VB, I'd use foreach or For
Each. But classic C/C++ does not have such a keyword. I want to know
if there is a workaround or template function?


C++/CLI (as implemented in VS2005) includes for each (two words) - use it just like you would in C#

See http://msdn2.microsoft.com/library/ms177202(en-us,vs.80).aspx

-cd


.



Relevant Pages

  • Does MC++ have foreach?
    ... I am very thrilled by the fact that I can write code agaist the .NET Framework (in new syntax). ... I want to know if there is a workaround or template function? ...
    (microsoft.public.dotnet.languages.vc)
  • Re: C++CLI and STL.NET and clrsafe
    ... > syntax every version, incompatibilities, framework issues, installation ... > issues, framework security patches, getting farther abstracted from what's ... market your language to management, ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Conformance
    ... Note that "long double" (extended precision) is a relatively ... that FRAMEWORK and not the individual applications. ... Do you then have a syntax for specifying syntax extensions for constant ... implementation were open source. ...
    (comp.std.c)
  • An Unfettered Language
    ... Syntax mastery will always be required, ... Framework mastery will be required for any given framework. ... "managed code" in a single framework, means that Object Pascal Programmer ... Pascal developers could independently port Delphi to the Win64 API.... ...
    (borland.public.delphi.non-technical)
  • RE: Repost: Update Text datatype from Linked Server Problem
    ... > GroupBy with ANY aggregates is the result of using the non-ansi update ... > stick to ansi update syntax and the problems will go away. ... change that part of the execution plan (the GroupBy with ANY aggregate is ... The workaround is failing for me. ...
    (microsoft.public.sqlserver.programming)