Search:

Type: Posts; User: krsauls

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    2,532

    Thanks...I will try that.

    Thanks...I will try that.
  2. Replies
    6
    Views
    2,532

    It did not find the \0. Here is the code where I...

    It did not find the \0. Here is the code where I read in the strings:



    int count = 0;

    //loop to get the coordinats and name of the patch
    while(fgets(line, sizeof(line),...
  3. Replies
    6
    Views
    2,532

    Not sure, although I do remember now that strcmp...

    Not sure, although I do remember now that strcmp requires this, no? How can I figure out if they do?
  4. Replies
    6
    Views
    2,532

    A question about strcmp...

    I'm having problems getting an equality with strcmp. Here is my code:



    char myframe[frameheight][framewidth];
    patch pptr;
    patch *p;
    p = &pptr;
    command cptr;
    command...
  5. Replies
    9
    Views
    1,859

    You da man. That got it...I guess my logic works...

    You da man. That got it...I guess my logic works after all, eh?

    Hey, fellas, I really appreciate it. It helps to have a second eye. I'll have to buy y'all a beer sometime.
  6. Replies
    9
    Views
    1,859

    OK. Here is the complete function. Things are...

    OK. Here is the complete function. Things are fine until I try to fill my array with the patches from the file input. I will repost that here:


    rect
    7 9
    +-------+
    | |
    | |
    | ...
  7. Replies
    9
    Views
    1,859

    Hell, I trust them more than mine! HA. I will...

    Hell, I trust them more than mine! HA. I will give it a go...thanks.
  8. Replies
    9
    Views
    1,859

    How about this? Can I use a pointer in my...

    How about this?

    Can I use a pointer in my structure and get it to point to an array that has been declared?

    My struct




    typedef struct {
  9. Replies
    9
    Views
    1,859

    Alright. That sounds good to me. Thank you.

    Alright. That sounds good to me. Thank you.
  10. Replies
    9
    Views
    1,859

    Structure arrays...

    Can it be done? And if so, would this be appropiate if my structure was already created?



    patch mystructures[10];
    patch p;
    patch *pptr;
    pptr = &p;
    .
    .
  11. Replies
    5
    Views
    1,546

    I got it going now. fscanf(patches,"%d %d",...

    I got it going now.


    fscanf(patches,"%d %d", p->height, p->width);

    should have had the & before the variables...8)


    fscanf(patches,"%d %d", &p->height, &p->width);
  12. Replies
    5
    Views
    1,546

    Tried this out and it causes my program to cras...

    Tried this out and it causes my program to cras when it hits this line.

    Partial snippet:


    while(fgets(line, sizeof(line), patches) != NULL) {
    strcpy(p->name, line);
    ...
  13. Replies
    5
    Views
    1,546

    Iwill try that out...thanks.

    Iwill try that out...thanks.
  14. Replies
    5
    Views
    1,546

    i guess my real question is, how can I read the...

    i guess my real question is, how can I read the second line



    7 9


    in as two separate integers?

    I tried reading the line in as a char array and creating tokens, but when I cast them like...
  15. Replies
    5
    Views
    1,546

    File Read/write

    Hello, I need a little help reading input from a file and placing it into a structure.

    The file looks like this:


    rect
    7 9
    +-------+
    | |
    | |
Results 1 to 15 of 18