View Single Post
Old 03-23-2005, 11:48 PM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,710
redhead is on a distinguished road
Code:
...
	FILE *ifp, *ofp;
	char **fname, **lname, *grades;
	float **scores;
	...
	  for (i = 0; i < N; ++i)
			 for (j = 0; j <50; ++j)
		   	fscanf (ifp, "%s", fname);
		
		
		for (i = 0; i < N; ++i)
			for (j = 0; j < 50; ++j)
			printf ("%s", fname[i][j]);
			printf ("\n");
...
There are some flaws in this, you can't read into a char** without having allocated the needed memory, this will produce random behaviour from your program.

I'll work on a solution in a minut, I just gotta get some breakfast now.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote