Search:

Type: Posts; User: theprogrammer

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    2,061

    Do you have any idea why the above program is...

    Do you have any idea why the above program is printing garbage for the age.
  2. Replies
    8
    Views
    2,061

    Actually they do exist. The second one allows you...

    Actually they do exist. The second one allows you to read strings with spaces using scanf, the first allows you to ignore the newline before an integer.

    I did try it without them though and it...
  3. Replies
    8
    Views
    2,061

    I am reading from a file. and I did use...

    I am reading from a file. and I did use fflush(filename) and it did not work.
  4. Replies
    8
    Views
    2,061

    fscanf integer problem please help!!

    the following code won't work properly. it is supposed to read a name and an age. print them to a file. read them back from the file and print them on the screen

    it prints the name from the file...
  5. Thanks every one

    The reason for the while loop is to clean out the input stream as suggested in the faq instead of using fflush(stdin) however I removed them and the code still works.

    Thanks a lot to everyone...
  6. Half Solution

    I read the faq's that vart suggested on fflush, feof, and fgets. I made the necessary changes I also am now reading in binary mode. the only effect now is that it is ony printing three characters...
  7. Mistake

    it should be &data[i] and not *data[i] * I had changed it while attempting to debug the program. program seems to be fine. if I make all thee arrays sizes small. but gives problems when the array...
  8. Struct File and array problem Please help

    Anyone knows why this code isn't working. the problem seems to be related to the size of the char arrays.

    I am trying to read some data into a struct, write the struct to a file, close the file,...
  9. Replies
    2
    Views
    1,192

    Thanks tabstop

    I am going to try that in a little while and let u know how it worked out.
  10. Replies
    2
    Views
    1,192

    Struct and file problem!!! urgent

    I am writing a program that refuses to work. I use fwrite to write the struct to a file in main. Everything seems to write properly. However I can't seem to read the info back from the file properly....
Results 1 to 10 of 10