我有一个字符串,我想从中获取最后2个字符,我该怎么办?
示例代码
char data[100][500];
fgets(data[y++], 500, f);
char *map_width, *map_height, *tile_height, *tile_width;
map_width = data[z+1]; /* equals to width=32 */
map_height = data[z+2]; /* equals to height=32 */
tile_height = data[z+4]; /* equals to tileheight=32 */
tile_width = data[z+3]; /* equals to tilewidth=32 */