~ User Input script help~
Hi all
I am new to c programming and i need help with the following logic, what i want to do is to ask user to input details and then process the file e.g
What I asked you to do was enabling a user to insert a line in a specific part of a text file, i.e.
You ask user the name of the file,
You ask user where (line number) s/he wants to insert the line
You ask user to provide the text for this line
You then insert this line into the specific part of the file and ask user whether s/he wants to continue or not.
thanks in advance...indy
Re: ~ User Input script help~
Quote:
Originally posted by indy
Hi all
I am new to c programming and i need help with the following logic, what i want to do is to ask user to input details and then process the file e.g
What I asked you to do was enabling a user to insert a line in a specific part of a text file, i.e.
You ask user the name of the file,
You ask user where (line number) s/he wants to insert the line
You ask user to provide the text for this line
You then insert this line into the specific part of the file and ask user whether s/he wants to continue or not.
thanks in advance...indy
Input num
Open input file
Open output file
Read num-1 lines, write each
Ask for input line
Write the input line
Ask to continue
etc.