Reputation: 1
MyPractice ^shan=gcnew MyPractice (L"Shahnawaz Talpur");
This executes well but I want to first declare variable ^shan and the assign the value how it could be
Upvotes: 0
Views: 283
Reputation: 37955
Use nullptr
:
// Declare and assign null
MyPractice^ shan = nullptr;
// Later when you need :
shan = gcnew MyPractice(L"Shahnawaz Talpur");
Upvotes: 1