#include <iostream>
#include <fstream>
using namespace std;
void printf_File(string name_File)
{
ifstream main_File(name_File.c_str());
if(main_File.is_open())
{
char temp_String[10000];
while(main_File.getline(temp_String,10000))
{
cout<<temp_String<<endl;
}
}
else
cout<<"I can't read - "<<name_File<<endl;
}
int main(int argc, char **argv)
{
string proc_Info[3]={"/proc/version","/proc/cpuinfo","/proc/meminfo"};
for(int i=0;i<3;i++)
{
printf_File(proc_Info[i]);
}
return 0;
}
wtorek, 31 października 2023
Directory /proc/ - g++
Subskrybuj:
Posty (Atom)