C++ 将一个文件读入数组再读出数组的方法

如下所示:

#include 
#include 
using namespace std;
#define MAX_PACK_SIZE 10240
void main() 
{ 
 char filePath[256]; 
 strcpy(filePath,"F:/视频/1.mp4");  //获取路径 
 FILE *pFile; 
 pFile=fopen(filePath,"r+b"); 
	if(pFile==NULL)
	{
		cout<<"打开文件失败"< 
 

以上这篇C++ 将一个文件读入数组再读出数组的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

你可能感兴趣的:(C++ 将一个文件读入数组再读出数组的方法)