I'm C newbie and i'm having a tough time with my first assignment :sad:
The assignment is on creating a Number Puzzle.....apparently it's the newest craze in Toronto and my prof is a big fan....unfortunately
I'm trying to read in a file which looks like this:
9,8, ,5,,4,,
7,3,1, ,5
this is what i want to do..
-Read in the file and use fscanf to store everything in an array of chars called tempGrid. (I don't want the extra white space between commas)
-then tempGrid to another 1D array pointed to by a pointer called *grid.....WITHOUT the commas.
-And just print out the result
Obviously this is not my whole assignment, only like 1% of it.
I've tried to do this simple thing for two days now and i can't seem to get it to work.
PLEASE HELP!!
Another question: does fscanf write the result straight to an array or do i have to pass in a pointer that points to an array?
Thanks for any help. I really appreciate it. I'm on the verge of tearing my hair out in frustration :sad: