当前位置:网站首页>File compositor
File compositor
2022-06-11 03:06:00 【shlyyy】
File compositor
One 、 demonstration
1. Input file name

2. Check out the newly generated NewPng file
2.1 NewPng.png


2.2 NewPng.rar


Example :
Two 、 Source code
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int Sub_3()
{
char ch, pic_name[20], file_name[20], finish_name[20];
FILE* f_pic, * f_file, * f_finish;
printf(" Please enter the name of the picture you want to compose \n");
printf(" picture :");
scanf("%s", pic_name);
printf(" file :");
scanf("%s", file_name);
printf(" Born into :");
scanf("%s", finish_name);
if (!(f_pic = fopen(pic_name, "rb")))
{
printf("Cannot open the picture %s !", pic_name);
return 0;
}
if (!(f_file = fopen(file_name, "rb")))
{
printf("Cannot open the file %s !", file_name);
return 0;
}
if (!(f_finish = fopen(finish_name, "wb")))
{
printf("Cannot open the file %s !", finish_name);
return 0;
}
while (!(feof(f_pic)))// Returns a non at the end of the file 0 value
{
ch = fgetc(f_pic);
fputc(ch, f_finish);
}
fclose(f_pic);
while (!(feof(f_file)))
{
ch = fgetc(f_file);
fputc(ch, f_finish);
}
fclose(f_file);
fclose(f_finish);
}
int main()
{
Sub_3();
system("pause");
return 0;
}
Be careful : file name ( route ) It's using scanf Function get from console , So there can be no spaces , Otherwise, it will be truncated .
Study
The basic operation of the file
边栏推荐
- sonarqube平台基础使用
- WordPress article directory plug-in luckywp table of contents setup tutorial
- GraphAcademy 课程讲解:《Neo4j 图数据科学基础》
- Android WiFi hide SSID
- Win10 安装Office 2016出现错误代码30204-44怎么处理?
- [new open source project] dynamic configuration task scheduling framework gobrs async joins the dromara open source community
- Necessity for banks to choose electronic bidding procurement
- HQChart钉钉小程序教程1-创建K线图
- C语言数组与指针练习题
- ORA-00392 ORA-00312 错误处理
猜你喜欢

Why did those who left Beijing, Shanghai and Guangzhou with a smile cry in the end?

Will your company choose to develop data center?

新来的同事问我 where 1=1 是什么意思???

Wechat applet

HUST Software Engineering (Experiment 2) -- TDD test driven development experiment.

Arduino uno connected to jq8900-16p voice broadcast module

怎样简洁明了地说清楚产品需求?

How can Delma's own brand "take off" when Philips is listed on the market?

CocosCreator原生二次开发的正确姿势

js 内存泄漏
随机推荐
B_QuRT_User_Guide(16)
富络经典源码富络经典系统开发原理分享
第七章 常用的协议简介(1)
Go 语言的优势和学习路线图
Explication du cours de graphacademy: neo4j Graph Data Science Foundation
UBIFS FAQ and HOWTO
Error in Solr access: error initializing queryelevationcomponent
已解决: JDBC连接Mysql失败报错: 'The last packet sent successfully to the server was 0 milliseconds ago. '
Looking at the ups and downs of the mobile phone accessories market from the green Union's sprint for IPO
HQChart钉钉小程序教程1-创建K线图
Net core Tianma XingKong series - Interface Implementation for dependency injection and mutual conversion of database tables and C entity classes
GraphAcademy 课程讲解:《Neo4j 图数据科学基础》
三维GIS行业需求及展望
出栈序列是否是入栈序列
pip 安装 qt5 。
Determine whether a string of numbers is the result of a quick sort
B / Qurt Utilisateur Guide (19)
Android WiFi hide SSID configuration method
Cypress 88359 WL command enable hotspot
二叉树最小最低公共祖先