Search:

Type: Posts; User: Robbie

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,383

    Haha ok thank you. I think I'm starting to...

    Haha ok thank you. I think I'm starting to picture it a little better. So for reading everything in the file and sorting it in the array would I do this:



    while (fscanf(fp," %c %c %d",...
  2. Replies
    10
    Views
    1,383

    Ok so maybe I've gone at this completely wrong....

    Ok so maybe I've gone at this completely wrong. What would be the best way to read in that file and store the color at the specified index? Like 'b' at array[A][1]?
  3. Replies
    10
    Views
    1,383

    I was thinking about doing that actually. If I...

    I was thinking about doing that actually. If I did that would it be legal to change column from a character array to a integer array and still read in the letters to that array?
  4. Replies
    10
    Views
    1,383

    A couple questions...

    Ok so I have a project where I read in a file containing a 3 columns of different numbers/letters. The three columns are [stone color] [column] [row]. For example



    b A 1
    b B 4
    B b 1
    B C 2...
  5. Replies
    46
    Views
    4,583

    ;) ;)

    ;) ;)
  6. Replies
    46
    Views
    4,583

    The part that my ADD forced me to ignore.

    The part that my ADD forced me to ignore.
  7. Replies
    46
    Views
    4,583

    works fine for me without the space.

    works fine for me without the space.
  8. Replies
    46
    Views
    4,583

    Thanks everybody for all your help! I really...

    Thanks everybody for all your help! I really appreciate it!
  9. Replies
    46
    Views
    4,583

    Nothing I read mentioned anything about this....

    Nothing I read mentioned anything about this. Thanks for the help though!
  10. Replies
    46
    Views
    4,583

    Thank you so much!! while (fscanf(fp," %c...

    Thank you so much!!

    while (fscanf(fp," %c %c%d", &stone_color[i], &column[i],&row[i]) == 3)

    and just for clarification and future use...why ==3? Where does the 3 come from?
  11. Replies
    46
    Views
    4,583

    boardtest.c:20: warning: incompatible implicit...

    boardtest.c:20: warning: incompatible implicit declaration of built-in function 'exit'
    thats what happens when I compile it now.
  12. Replies
    46
    Views
    4,583

    [QUOTE=CommonTater;1051741] Listen dawg....I...

    Listen dawg....I popped a Vyvanse at around 4:00 P.M. yesterday thinking "Hell yeah gonna program the ........ out dis project." Sat down at my computer...read through the project, opened up putty...
  13. Replies
    46
    Views
    4,583

    [QUOTE=CommonTater;1051726] Actually I did go...

    Actually I did go back and read a little section on scanf the first time. Nothing. After your last post I said to myself "Hey maybe this guy is on to something. Maybe I should check the book again."...
  14. Replies
    46
    Views
    4,583

    Can you tell me why I'd use scanf instead of...

    Can you tell me why I'd use scanf instead of fscanf and why the condition is >2?
  15. Replies
    46
    Views
    4,583

    Ok switched the %s's to %c but I'm still getting...

    Ok switched the %s's to %c but I'm still getting segmentation fault. How would I write it so that it reads 3 columns at a time?
  16. Replies
    46
    Views
    4,583

    Need help fixing segmentation fault

    I have to write a program for my class and I am having a bit of trouble with the file pointer.


    #include <stdio.h>
    #include <string.h>

    int main(void) {

    char stone_color[82];
    char...
Results 1 to 16 of 16