I have a char array with the size of 128. I want to copy the first 32 to another char array. This is how i'm trying to do it:
char ticket[128];
data.readBytes(ticketLength, (BYTE*)ticket);
char sessionID[32];
strcpy(sessionID, ticket);
int userID = bdAuthService::checkLogin(sessionID);
The contents of "ticket" are "11aa14462ac96a9b389686672b99fa9e1IvtooKO6eVxVHO6URIQld8jFaceTaker" and when i'm trying to pass the sessionID to the checkLogin function it gets the same contents as ticket "11aa14462ac96a9b389686672b99fa9e1IvtooKO6eVxVHO6URIQld8jFaceTaker".
Can anyone help me here?