Search:

Type: Posts; User: MK27

Search: Search took 0.08 seconds.

  1. Replies
    7
    Views
    11,269

    However, it is equally true if problem[0] were a...

    However, it is equally true if problem[0] were a pointer to a regular char; you do need the address of operator when passing a pointer to a scanf function. You only need the address of if you are...
  2. Replies
    7
    Views
    11,269

    This will work: fscanf(file_ID, "%s %s...

    This will work:


    fscanf(file_ID, "%s %s %s\n", header, problem[0], problem[1]);


    no &; problem[0] is a pointer (you are used to passing the address of an int variable)
Results 1 to 2 of 2