(How embarassing. I thought I was talking to Cornedbee and not Codeplug for some reason. I fixed my previous post.)
I have at most just scanned through a few libraries on boost.org. I haven't ever used it and still don't plan to. There's no real reason for that except that I don't want to depend on anything that isn't standard. In any case, thanks for the assistance. Now I can do this successfully:
Code:
int intarr[] = { 100, 200, 300 };
char *str = new char[100];
strcpy(str, "This is a pointer to a character array");
char str2[] = "This is a fixed-length character array";
std::string stlstr = "This is an STL string";
Morph arr[COUNT] = { 'X', 1, "Var 3", 4444, 3.14159, UINT_MAX, wchar_t(65535), str, str2, stlstr, intarr };
for (int i = 0; i < COUNT; ++i)
cout << "arr[" << i << "] = " << arr[i] << endl;
delete [] str;
Of course there are still tons of things I'd like the class to do, but that's what time is for.
Btw, the output of that looks like this:
arr[0] = X
arr[1] = 1
arr[2] = Var 3
arr[3] = 4444
arr[4] = 3.14159
arr[5] = 4294967295
arr[6] = 65535
arr[7] = This is a pointer to a character array
arr[8] = This is a fixed-length character array
arr[9] = This is an STL string
arr[10] = { 100, 200, 300 }