Search:

Type: Posts; User: Nterpol

Search: Search took 0.01 seconds.

  1. Need help with reading numbers from the command line

    Hi guys,

    I'm not sure how to word the question so I'll just show an example,

    Example:
    main 25/3

    Now, here's what I want to do. I want to take the three numbers and use them in a switch...
  2. Replies
    13
    Views
    1,553

    addresses[k] = (address_record*) malloc (200 *...

    addresses[k] = (address_record*) malloc (200 * sizeof(address_record));


    How about now?
  3. Replies
    13
    Views
    1,553

    Here's the part that I updated, everything else...

    Here's the part that I updated, everything else remained the same.



    void get_input (address_record* addresses[], int* nr_addresses)
    {
    int k;
    char file_name[1000];
    FILE*...
  4. Replies
    13
    Views
    1,553

    Sweet! Edit* Now I'm confused on how I...

    Sweet!

    Edit*

    Now I'm confused on how I would go about getting the data. I would use fscanf (could I also use sscanf?) right? Do I store the results from fscanf in another variable that I...
  5. Replies
    13
    Views
    1,553

    Yeah, So I would use malloc in the get_input...

    Yeah,

    So I would use malloc in the get_input function before I start getting the data, correct?
  6. Replies
    13
    Views
    1,553

    It's what my teacher wants us to do. :confused:

    It's what my teacher wants us to do. :confused:
  7. Replies
    13
    Views
    1,553

    I need help fixing a warning

    Hi guys,

    I'm a beginner in C and need help with my project for school. Here's my code,



    /* -------------------------------------------------------
    * Carpooling
    *...
Results 1 to 7 of 7