开发者

how define handle object in c++/CLR

开发者 https://www.devze.com 2023-03-13 13:57 出处:网络
MyPractice ^shan=gcnew MyPractice (L\"Shahnawaz Talpur\"); This executes well but I want to first declare variable ^shan and the ass开发者_如何学JAVAign the value how it could beUse nullptr:
MyPractice ^shan=gcnew MyPractice (L"Shahnawaz Talpur");

This executes well but I want to first declare variable ^shan and the ass开发者_如何学JAVAign the value how it could be


Use nullptr :

// Declare and assign null
MyPractice^ shan = nullptr;

// Later when you need :
shan = gcnew MyPractice(L"Shahnawaz Talpur");
0

精彩评论

暂无评论...
验证码 换一张
取 消