Hello! I wonder how can i read data from file into screen using structures.
For example, if i have "file.txt" that consists data of name,age,location:
Jason 34 Bern
Mike 23 Ottawa
Ted 35 Berlin
Thank ya.
Hello! I wonder how can i read data from file into screen using structures.
For example, if i have "file.txt" that consists data of name,age,location:
Jason 34 Bern
Mike 23 Ottawa
Ted 35 Berlin
Thank ya.
read data from the file using fgets, then using strtok() function tokenize the read string and store into the structure(preferable structure array). Then print the contents of structure onto the screen
Why do that when you can get someone else to do your homework, eh?
- Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
- A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
- The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.