QUOTE(girasquid @ 26 Sep, 2008 - 01:16 PM)

CODE
string output = system('cat /proc/uptime');
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Please post like this:

Thank you for helping us helping you.
OK, I know it's ugly, but here's what I've got.
CODE
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
system('cat /proc/uptime');
system('cat /proc/sys/kernel/hostname');
system('cat /proc/version');
system('cat /proc/meminfo');
system('cat /proc/driver/rtc');
return 0;
}
I'm getting warning messages that say, "Character constant too long for its type."
And error messages that say, "Invalid conversion from 'int' to 'const char*'
initializing argument 1 of 'int system(const char*)' "
I know I'm missing some things but have no idea what they are. I just want to read in the info from these files and have that info displayed.
Please advise.
This post has been edited by chaoticabyss99: 26 Sep, 2008 - 01:47 PM