String VS 2013一直在说;“字符串”;未定义,i';I’我不确定这有什么问题
我不确定字符串未定义是什么意思,我试着用谷歌搜索它,但结果只是关于字符串的随机信息String VS 2013一直在说;“字符串”;未定义,i';I’我不确定这有什么问题,string,namespaces,c++-cli,String,Namespaces,C++ Cli,我不确定字符串未定义是什么意思,我试着用谷歌搜索它,但结果只是关于字符串的随机信息 #include "MyForm.h" #include "String" using namespace System::Windows::Forms; [STAThread] int main(cli::array<String^>^ args) { Application::EnableVisualStyles(); Application::SetCompatibleTex
#include "MyForm.h"
#include "String"
using namespace System::Windows::Forms;
[STAThread]
int main(cli::array<String^>^ args)
{
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Organizer1::MyForm form;
Application::Run(%form);
}
#包括“MyForm.h”
#包括“字符串”
使用命名空间System::Windows::Forms;
[状态线程]
int main(cli::数组^args)
{
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Organizer1::MyForm;
应用程序::运行(%form);
}
类字符串
在名称apce系统中定义
所以要么写
using namespace System;
或者使用限定名
int main(cli::array<System::String^>^ args)
^^^^^^^^^^^^
intmain(cli::数组^args)
^^^^^^^^^^^^
请尝试使用小写的字符串。另外,如果您打算使用C++std字符串,您应该以#include
的形式编写。您的意思是吗?谢谢,很抱歉之前没有接受,我的internet中断了一段时间,但这很有效!非常感谢您抽出时间。