Search:

Type: Posts; User: Subsonics

Search: Search took 0.02 seconds.

  1. Replies
    11
    Views
    1,355

    There are some other issues there. You don't need...

    There are some other issues there. You don't need your local variables apart from int i, you can scan directly to your struct. Also has_planet is always 0 so the test if(!has_planet) will always be...
  2. Replies
    11
    Views
    1,355

    You are iterating from 0 to numberofinputs, 'i'...

    You are iterating from 0 to numberofinputs, 'i' is the current index. But you always use numberofinputs as index instead of i with gets. Also use fgets.



    fgets(solarsys[i].description, 1024,...
  3. Replies
    11
    Views
    1,355

    There is no way for gets to restrict the input...

    There is no way for gets to restrict the input length, that's the warning. Use fgets instead.
Results 1 to 3 of 3