📄 strcatnw.cpp
字号:
#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <conio.h>
void main(void)
{
char *line;
char text[81];
int line_num = 1;
while(gets(text) != NULL) {
line = new char[strlen(text) + 3]; //
itoa(line_num, line, 10); // line
strcat(line, ". "); // line
strcat(line, text); // line
cout << line << endl;
line_num++;
delete line; //
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -