Thanks for the advice there lads.........however I just got it to work
Type: Posts; User: beginner999
Thanks for the advice there lads.........however I just got it to work
I want to change the value in an index of an array
I have partially posted the code where I am having problems with:
[code]
array[6]={2.02,2.05,3.20,3.28,5.0,5.0};
float score;
if...
What seems to be happening is its only printing
array[i][j] all the ways down the screen.
I want it to print the contents of the file:
e.g
0,1.00
1,0.99
etc
etc
etc
As you can see I don't really have a clue how to read in the file. Do you need to use fscanf twice for each line in the file?
Anyhow below is my miserable attempt:
<code>
#include <stdio.h>...
I wonder could anybody help me reading in a file to a 2d array
File rates.txt contains:
1.00,0.99,0.64,121.42,4.65
0,1,2,3,4
I am new to c so any help would be much appreciated.
Thanks for your help monster, much appreciated......I will give it a go
Hi guys,
I am just learning c programming for the first time and having problems reading in a file into a 2d array.
The file contains the following:
1 euro
0.99 dollars
0.64 pounds
121.42...