Hi all,
I'm working with some date formating, with local and UTC time format. At the end I've print the result to the console as follows.
cout << stLocal.wMonth << "/" << stLocal.wDay << "/" << stLocal.wYear << " " << stLocal.wHour << ":" << stLocal.wMinute << "\n";
This line of code works fine, but seems this is too dull when passing this time. Actually I want to pass that value as a string(as a single value) and try the following.
ostringstream os;
os << stLocal.wMonth << "/" << stLocal.wDay << "/" << stLocal.wYear << " " << stLocal.wHour << ":" << stLocal.wMinute << "\t";
cout << os;//0012FA3C
The thing here the output is just a number, 0012FA3C for all values.
What's wrong with my code.