Search:

Type: Posts; User: aidan4

Search: Search took 0.01 seconds.

  1. Replies
    16
    Views
    18,940

    Thank you. Something I still can't understand and...

    Thank you. Something I still can't understand and if you clear it for me I'd appreciate. Why is fgets returning -1?(even after deleting the code you mentioned). I understand that fgets would be NULL...
  2. Replies
    16
    Views
    18,940

    It is comparing the two strings to see if they...

    It is comparing the two strings to see if they are equal, if not it returns -1
  3. Replies
    16
    Views
    18,940

    How could I read the file if it is separated by...

    How could I read the file if it is separated by tabs?
  4. Replies
    16
    Views
    18,940

    It is separated by tabs.

    It is separated by tabs.
  5. Replies
    16
    Views
    18,940

    Thank you again for your response. I tried to...

    Thank you again for your response. I tried to implement your code to see how it works and try to implement mine based on that. However, using yours the read_coords returns -1 from this

    ...
  6. Replies
    16
    Views
    18,940

    the function actually doesn't return anything....

    the function actually doesn't return anything. What would cause fscanf not to match any numbers? The file is being opened successfully. I checked that part
  7. Replies
    16
    Views
    18,940

    Thank you for your response and helping me. I...

    Thank you for your response and helping me. I have tried the function and declared the num_max to be 15 as the file has 15 coordinates. I also added a printf at the end of the function to be able to...
  8. Replies
    16
    Views
    18,940

    Is max_num param represent the number of...

    Is max_num param represent the number of coordinates that the file has?
  9. Replies
    16
    Views
    18,940

    Read file data and store to an array

    Hi everyone,

    I am a bit new with C and I am trying to read a file which is (x,y) coordinates and store them individually into an array for further calculations on x or y.



    case 1:
    ...
Results 1 to 9 of 9