I am trying to learn C++, and all this pointer sh*t is killing meCode:POINT pnt; char *cTitle, *cX, *cY; char cXBuffer[20], cYBuffer[20]; GetCursorPos(&pnt); _ltoa(pnt.x,cXBuffer,10); _ltoa(pnt.y,cYBuffer,10); cTitle = "Current mouse postion is: "; SetWindowText(hwnd,cTitle);
i want to concat together a Title for my app in a timer and chage it every half second or so
the above code blows up and debug takes me into the string.h to debug strcat() yeah like i'm that good yet its assembly i barly know what assembly looks like anyway i know it goes boom because of cXBuffer and cYBuffer but how do I fix this?Code:strcat(cTitle, cXBuffer); strcat(cTitle, ", "); strcat(cTitle,cYBuffer);
Thanks




Reply With Quote