in_file = fopen("file:///C:/program.txt", "r"); /*trying to open file*/<======= This line is not needed.
Since it opens the file in the if statement below. Look at the if statement....there...
Type: Posts; User: mvision
in_file = fopen("file:///C:/program.txt", "r"); /*trying to open file*/<======= This line is not needed.
Since it opens the file in the if statement below. Look at the if statement....there...
But can anyone aswer my real problem?
Why CAN'T I use gets() ?
Thanx quzah!
I knew the structure of sprintf() is:
sprintf(String, FormatControlString, PrintList);
But I wasn't sure about the "size<0||size>3?1:size" part.
I do understand it now....you...
sprintf( buf, "<h%d>", size<0||size>3?1:size );
Could you explain this statement? It is foreign to me.
I have built this function for my program and it works, but it took me awhile to figure it out. And it doesn't make sense to me. Take a look.
...
:D
I actually figured it out on my own! Basically it is "Random Creation of a Record Text File". Quzah, your right. A blank line is nothing more than "\n\r". But in C you can access a file...
My instructor said that you can search a file's lines for a "null", a line that is left blank within the file, and then write to that line. She didn't know the syntax for it, but she remembered...
Someone please help me! As a project for my class I am supposed to write a program of my own, however, I have become stuck on something.
When I open a text file like this:
fopen(file_name, "w")...