Hey everyone,

i want to read in the output of /proc/loadavg. Because this should be handled as a normal file, i thought i could do it this way (open the files, not yet read them):

Code:
        char* file = "/proc/loadavg";
	ofstream output;

	output.open(file,ios_base::in);

	if(output.good()){
		// was able to open file
		cout << "opened\n";
	}
	
	output.close();
	if(output.good()){
		cout << "closed";
	}
But it seems like output.good() and output.close() dont return true, because no output is generated!

I already checked the rights.

When I create a text file in my home folder and open it with that code snipped, it works well.

Any ideas? Google and the board search did not provide any useful results.

Thank you!
crisis