This code is supposed to copy a token (two characters) from the 1-D character array linetext to *token. But when I cout *token, only the second character is printed. Does this mean that I incorrectly copied linetext or that I'm incorrectly printed token?
(*token) = (char *) malloc(tokenLength + 1);
memcpy (*token, &linetext[i], tokenLength);
cout << "token: " << *token << endl;