Variables in strings (part II)
Ok, I am trying to MessageBox an integer variable. I can convert it to a string using itoa(), but how can i put text into it? This is what i am doing now:
Code:
int szTickCount;
char buffer[33];
szTickCount = GetTickCount();
szTickCount = szTickCount/(1000*60); //minutes
itoa(szTickCount, buffer, 10);
MessageBox(NULL, buffer, "How long have you been on?", MB_OK | MB_ICONINFORMATION);
This works, but all it says is the number (ex: 43). How can I redo this so it says something like "Your computer has been on for 43 minutes"?