strcatzw.cpp
来自「c语言教程源码」· C++ 代码 · 共 30 行
CPP
30 行
// This program is saves as STRCATZW.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;
cout << "Line number adding is in processing..." << endl;
while(gets(text) != NULL) {
line = new char[strlen(text) + 3];
strcat(line, ". ");
strcat(line, text);
cout << line << endl;
line_num++;
delete []line;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?