Insider1984
Technical User
Basically I have a data file that I want to analize.
Each line is a string.
What I know?
============
I know how to input a string from keyboard and use it once it is inside my main program.
I know how to input data char int floats etc from data files. (very very basic)
What do I think?
================
I think I need to use some sort of Char array buffer
for example:
while getchar() isn't Null
store char from file at end of char array buffer
when getchar == null
string named buffer gets analized and data is then send to file
What I don't know:
==================
how to tell when it's end of file (how do I look for null inside a char array while loop)
the actual code for this! =-)
Thanks for the help, I'm new to the forum and I hope to hear something back. I know it may be a simple problem but hopefully someone can get me going in the right direction.
Each line is a string.
What I know?
============
I know how to input a string from keyboard and use it once it is inside my main program.
I know how to input data char int floats etc from data files. (very very basic)
What do I think?
================
I think I need to use some sort of Char array buffer
for example:
while getchar() isn't Null
store char from file at end of char array buffer
when getchar == null
string named buffer gets analized and data is then send to file
What I don't know:
==================
how to tell when it's end of file (how do I look for null inside a char array while loop)
the actual code for this! =-)
Thanks for the help, I'm new to the forum and I hope to hear something back. I know it may be a simple problem but hopefully someone can get me going in the right direction.