Reading thru it now
/* test and remove newline character */
if ((l = strchr(storage[linesRead], '\n')) != NULL)
*l = '\0';
Type: Posts; User: shibby
Reading thru it now
/* test and remove newline character */
if ((l = strchr(storage[linesRead], '\n')) != NULL)
*l = '\0';
Ah right so there could be a \n which is causing the problem.
Will fiddle about and see what i get can get done.
Basicly even thou my file says the word red and my const pointers say red they are not the same.
For example if i compared my arrBandsFile[0] (which holds the word red) to my const pointer which...
no one :'(
The fgets worked a treat Thanks!!!
but one slight problem which is now hopefully the last.
Basicly the user has 2 choices, they can enter in the colours themselves via a menu or a list they have...
Ok new problem
When it loops to add each line to the var and then to the array, It does it character by character, i need each line to have its own place in the array.
BandsFileArr[0]r...
LOL
How can I be so stupid? And how can you people put up with someone like me.
many thanks!!!
I will probley run to some little problems later, but I'll be sure to carry on using this thread.
**EDIT**
New help needed please see below
Please be gently i'm still struggling to get to grips with C
Basicly i want to read from my file.
I put the first line as the Resis
Second line...
Thanks Guys.
No idea why i didn't think of this before.
Silly me.
But thanks again.
Hi
Say I have a 2D array with some data
that holds a resistance and what temperature that result gives.
Now I do a a calculation that gives me a resistance. But in my array i have not got that...