First, end the structure definition with a semicolon:
struct CpuInfo {
char vendor_id[50];
int family;
char model[50];
float freq;
char cache[20];
}[B];[/B]
[Dani - here's where I wish I had the ability to make the size bigger.]
Here you need to carefully watch how you use parentheses:
if( ( cpuInfo = fopen("/proc/cpuinfo", "rb") == NULL ) ) {
if( ( cpuInfo = fopen("/proc/cpuinfo", "rb")) == NULL ) {
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
Skill Endorsements: 38