⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 strcatnw.cpp

📁 C++的常用算法
💻 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 + -