wow, that was mentioned earlier and I thought "I did too rewind!" not realising I needed to rewind TWICE.
Thank you for putting up with my ignorance, your help was awesome.
Thanks to everyone...
Type: Posts; User: voraciousveggie
wow, that was mentioned earlier and I thought "I did too rewind!" not realising I needed to rewind TWICE.
Thank you for putting up with my ignorance, your help was awesome.
Thanks to everyone...
1. have a little indenting
2. else's now gone
3. compiler did complain, added & for address
for (count = 0; count < elements; count++)
{
fscanf (pfile, "%d", &realdata[count]);
}
Ok here's the whole shabang:
#include<stdio.h>
#include<stdlib.h>
int main()
{
long lSize;
Right, ok that's an easy fix.
I'm most concerned with if the method is feasible. Right now I am not getting any numbers read into the array, just a bunch of zeros when I print out. Would that...
Doesn't it loop exactly as many times as there are elements?
I'll try anything that works, are you talking about fgets? Doesn't that read into a string that needs to be converted to integers...
Theses numbers are not output from another program, there is no opportunity to "fwrite", I need to get them into a program first, then I can work with them.
Ok since I'm not using binary data, I'm...
I'm sure it's my lack of coding skills, not fread's fault : ).
I'm trying to read a text file full of integers into an array. The input file consists of one integer per line and the number of...