How about returning a std::string? I'm not certain about the internals of std::string in any implementation, but I would assume that reference counting and copy on write methods are widely use, which should give little or no penalties for returning such objects.
I will look into it. The problem may come in how the va_list in the make() function handles std::strings as the type of the variable gets lost in the variable list (at least according to MSDN), which is why I wanted to use char* pointers. I am going to take a break now and look at it again later. Thanks for the help so far.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
I am trying to catch a LVIS_STATEIMAGEMASK change in OnLvnItemchanged and I don't want to catch the initial population of the list.
One way around this is to set a flag variable to true before populating the list, and then set it to false after populating the list. Then in the OnLvnItemchanged() method, don't do anything if the flag variable is equal to true. Make sense?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
When i enter the words rents and will the program will say "will is larger than rents" which is wrong. I can't figure out why it's doing that. I supplied the code below (might have forgot little things like ; or ,). If anyone can tell me what is wrong it would help me a lot. I'm new to C++ programming.
using namespace std;
string a, b;
cout << "Enter two words." << endl;
cin >> a >> b;
string small, big;
if (a < b)
small = a;
big = b;
if (a > b)
small = b;
big = a;
if (a.size() == b.size() && a != b))
cout << "Same size, but different string" << endl;
if (a == b)
cout << "Their the same string" << endl;
cout << big << " is larger than " << small << endl;