C Syntax Question

A

abhishekkarnik

I was going over MSDN to find a way to enumerate files using C++. I
came across some syntax that looks like:
DirectoryInfo^ di = gcnew DirectoryInfo("..\\GA\\Files");
array<FileInfo^>^fiArr = di->GetFiles();
Collections::IEnumerator^ myEnum = fiArr->GetEnumerator();
while ( myEnum->MoveNext() )
{
FileInfo^ fri = safe_cast<FileInfo^>(myEnum->Current);
Console::WriteLine( fri->Name );
}

My question is, what are all the "^" and if there is any documentation
anyone knows off so that I can read about it

regards,
Abhi
 
P

pete

I was going over MSDN to find a way to enumerate files using C++. I
came across some syntax that looks like:
DirectoryInfo^ di = gcnew DirectoryInfo("..\\GA\\Files");
array<FileInfo^>^fiArr = di->GetFiles();
Collections::IEnumerator^ myEnum = fiArr->GetEnumerator();
while ( myEnum->MoveNext() )
{
FileInfo^ fri = safe_cast<FileInfo^>(myEnum->Current);
Console::WriteLine( fri->Name );
}

My question is, what are all the "^" and if there is any documentation
anyone knows off so that I can read about it
 
T

Thomas J. Gritzan

pete said:
news:comp.lang.c++

No. It's a Microsoft extension, either C# or C++/CLI and is also offtopic
in comp.lang.c++. Try a programming newsgroup about .NET.
 
M

Malcolm McLean

I was going over MSDN to find a way to enumerate files using C++. I
came across some syntax that looks like:
DirectoryInfo^ di = gcnew DirectoryInfo("..\\GA\\Files");
array<FileInfo^>^fiArr = di->GetFiles();
Collections::IEnumerator^ myEnum = fiArr->GetEnumerator();
while ( myEnum->MoveNext() )
{
FileInfo^ fri = safe_cast<FileInfo^>(myEnum->Current);
Console::WriteLine( fri->Name );
}

My question is, what are all the "^" and if there is any documentation
anyone knows off so that I can read about it
It's a Chinese hat.
It means your job is about to be exported to China. Microsoft put them in so
the new programmers would feel at home.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top