I have this string info[35]. i want to extract the last 7 byte, so i shall extract from &info[29]. I use memmove to do this extracting, but return funny characters.
memset(nfo, 0x00, sizeof(nfo));
memcpy(nfo, info, sizeof(info)); //copy whole string 35 byte
memmove(nfo, &nfo[29], 7); //move the last 7 byte to nfo
memcpy(db_info, nfo, 7); //copy the 7byte nfo to db_info
is this correct?
thanks
memset(nfo, 0x00, sizeof(nfo));
memcpy(nfo, info, sizeof(info)); //copy whole string 35 byte
memmove(nfo, &nfo[29], 7); //move the last 7 byte to nfo
memcpy(db_info, nfo, 7); //copy the 7byte nfo to db_info
is this correct?
thanks