I am an experienced VB.NET programmer, trying to get a handle on C++ (console only, not Visual C++). I am having a problem with using classes.
In VB.NET you can globally declare an instance of a class that's not initialized. Then, later on, when an event occurs you can initialize it. (e.g. MyString = New String) It will then execute the code in the constructor.
How can I accomplish this in C++?
int _tmain(int argc, _TCHAR* argv)
//Declare a global instance of the File class
cout << "Please select one of the following options:\n";
cout << "1) Setup a File\n";
cin >> iChoice;
if (iChoice == 1)
//This next line doesn't work in C++, what should it be?
myFile = New File;
cout << "Invalid choice.\n";