Conversion of types in c++
Posted on 2003-03-04
Ok, ive been at this c++ thing for a few weeks now, and i have a question which has been bugging me (no pun intended :P)
How do you convert from char to int to string to char to byte??!!
For example, i am getting the seconds played in a wave file, using a MMTIME struct :-
time.wType = TIME_MS;
waveOutGetPosition(waveHandle, &time, sizeof(time));
char c = time.u.smpte.sec;
TextOut(GetDC(hwnd), 420, 50, (char*)c, sizeof(c));
this shows nothing at all!
(yes the space at 420, 50 is clear :P)
So can someone just give me a quick example of how to do some type conversions??