哦,这个问题经典
回复 9楼 星辰雁
不明白,同时退格,位置应该不变吧[ 本帖最后由 jianyuling00 于 2012-3-19 00:59 编辑 ]
#include <stdio.h> #include <conio.h> void main(void) { printf_s("01234567890123456789\n"); //printf_s("\t"); //_getch(); printf_s(" "); _getch(); printf_s("\b"); _getch(); printf_s("1"); _getch(); printf_s("\b"); _getch(); printf_s("5"); _getch(); }
#include <stdio.h> #include <conio.h> void main(void) { const char str[] = "\t \b1\b5"; const char* p = str; puts("12345678901234567890"); printf_s("%s\n", str); //puts(str); while (*p) { //printf_s("%c", *p); putchar(*p); //_putch(*p); ++p; } _getch(); }