array<System::String ^> 如何成为标准C++?

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

本文关键字:何成 标准 C++ lt System String array gt      更新时间:2023-10-16

选择在Microsoft Visual Studio 2010中创建新的控制台应用程序后,它为我创建了以下源文件:

#include "stdafx.h"
using namespace System;
int main(array<System::String ^> ^args)
{
    Console::WriteLine(L"Hello World");
    return 0;
}

那些插入符号(^)是什么?

它看起来不像标准C++。

它们不是离题图。

尽管如此,它的构建没有任何错误。

它不是标准的C++,它是由Microsoft创建的一种语言,名为"C++/CLI"

在StackOverflow上,如果您对此语言有疑问,请使用c++-cli标记。标签信息显示:

C++/CLI基于C++,经过修改,可以混合编译本机代码和用于Microsoft公共语言基础结构(CLI)的代码。它取代了微软的C++托管扩展,后者旨在增强C++的一致性。