Hi guys,
I'm new at programming and i can't find how to do this:
I need to write a function that reads a txt file that filled with double numbers and print it on screen.
Thanks.
Hi guys,
I'm new at programming and i can't find how to do this:
I need to write a function that reads a txt file that filled with double numbers and print it on screen.
Thanks.
Have you checked our FAQ? It covers these things.
My best code is written with the delete key.
Yes i did and some other places and books but i can't figure out how to make it
How about posting a program which just reads a text file, and prints it back to the user?
If you can manage that, you're more than half way there.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
That's what i need but i couldn't do it
Like you've never used fopen / fgets and fclose before?
There you go, read up on those and give it a shot.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
i tried that, i manage to open the file but i how i read it? and print it on screen?
my english is not that strong with all the explanations in books and help
while ( fgets( ) ) fputs( )
Will read a file, and print it to the screen.
I'll leave you to figure out what parameters should go in there, and to post your attempt.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.