Hi
Ok...I got a problem in reading a file containning information, and
trying to send it to a function...
the file containing information has format:
Gas 10000 Home Gas Meter
Electricity 3000 Home Electricity Meter
Flight 8000 Holiday Abroad
Flight 1000 Long Weekend
Car 1250 Own Car (10000 miles)
Car 500 Holiday Hire Car
I would like to put the first column to be stored in an array called -
char fuel [ ]
second column - double amount
third column - char description [ ]
the first and second will be used by a fuction called double co2(char
fuel [ ], double amount)
and the third will be stored in the int main ....
Second Question...Can you return 2 values from a function double
co2(char fuel [ ], double amount)??
Thanks
Chris
Ok...I got a problem in reading a file containning information, and
trying to send it to a function...
the file containing information has format:
Gas 10000 Home Gas Meter
Electricity 3000 Home Electricity Meter
Flight 8000 Holiday Abroad
Flight 1000 Long Weekend
Car 1250 Own Car (10000 miles)
Car 500 Holiday Hire Car
I would like to put the first column to be stored in an array called -
char fuel [ ]
second column - double amount
third column - char description [ ]
the first and second will be used by a fuction called double co2(char
fuel [ ], double amount)
and the third will be stored in the int main ....
Second Question...Can you return 2 values from a function double
co2(char fuel [ ], double amount)??
Thanks
Chris
Comment