Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is array<System::String ^> standard C++?

After choosing to create a new console application in Microsoft Visual Studio 2010, it created the following source file for me:

#include "stdafx.h"
using namespace System;

int main(array<System::String ^> ^args)
{
    Console::WriteLine(L"Hello World");
    return 0;
}

What are those caret (^) characters?

It doesn't look like Standard C++.

They are not digraphs.

Nevertheless, it builds without any errors.

like image 868
Trevor Hickey Avatar asked Jan 19 '26 15:01

Trevor Hickey


1 Answers

It's not standard C++, it's a language created by Microsoft called “C++/CLI”.

On StackOverflow, use the c++-cli tag if you have questions about this language. Here's what the tag info says:

C++/CLI is based on C++, modified to allow compilation of a mixture of native code and code for Microsoft's Common Language Infrastructure (CLI). It replaces Microsoft's Managed Extensions for C++, which aimed for stronger C++ conformance.

like image 67
roeland Avatar answered Jan 21 '26 08:01

roeland