Search:

Type: Posts; User: wolf

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    1,365

    Thanks. I found the function was only called in...

    Thanks. I found the function was only called in one place, and copied all the code in place of the function call. It works now.
  2. Replies
    8
    Views
    1,365

    I'm developing using VC++ 6.0. The code compiles...

    I'm developing using VC++ 6.0. The code compiles and links fine using it.

    However, it needs to be embedded and the device requires the MS-DOS C51 compiler.
  3. Replies
    8
    Views
    1,365

    help with linker error

    I'm trying to debug and received this compiler error message:
    Unable to optimize func1(). Compile stopped. Use the following workaround:
    #pragma OPTIMIZE(4)
    func1(void)
    {
    ...
    } // end func1...
  4. Thread: sscanf debug help

    by wolf
    Replies
    11
    Views
    2,670

    makes sense

    when you put it like that. I understand now.
    Thanks for laying it out.

    wolf
  5. Thread: sscanf debug help

    by wolf
    Replies
    11
    Views
    2,670

    agreed

    good for precise formatting.
    Not so in this case. I've got part of it to work using multiple strchr and atoi.

    Thanks quzah and Javariel. I do appreciate your help.

    wolf
  6. Thread: sscanf debug help

    by wolf
    Replies
    11
    Views
    2,670

    you're right

    I should be more specific. Sorry.

    using this code



    char line[40], *tag, a[40], b[40];
    int n = -1;

    strcpy(line, "This is an order for (XYZ-2) some order");
  7. Thread: sscanf debug help

    by wolf
    Replies
    11
    Views
    2,670

    ugh

    sscanf(line,"%s %*d %*s",a, n, b);


    no change.
  8. Thread: sscanf debug help

    by wolf
    Replies
    11
    Views
    2,670

    still no luck

    char line[40], *tag, a[40], b[40];
    int n;

    strcpy(line, "This is an order for (XYZ-2) some order");
    tag = strchr(line, '(');
    strcpy(line, &tag[1]); // get rid of all text before and including...
  9. Thread: sscanf debug help

    by wolf
    Replies
    11
    Views
    2,670

    sscanf debug help

    Can someone please help me.
    I don't understand why this doesn't work.




    char *line, *tag, *a, *b;
    int n;

    strcpy(line, "This is an order for (XYZ-2) some order");
  10. Replies
    5
    Views
    1,183

    Forgot to include the error checking, but it is...

    Forgot to include the error checking, but it is in place:

    if (!p)
    exit(1);
    if (!n)
    exit(1);

    Will try them as static, but I thought static variables could not be changed?

    I appreciate...
  11. Replies
    5
    Views
    1,183

    corrupt function parameters question

    I have two large arrays of structures I could not declare as arrays (array too big error) but could allocate dynamically

    n[138] and p[317]
    and am trying to pass them as parameters to a function....
  12. Replies
    2
    Views
    1,148

    Awesome. Thanks Salem.

    Awesome. Thanks Salem.
  13. Replies
    2
    Views
    1,148

    dynamic 2D array question

    With a dynamic 2D array:

    int *arr;

    arr = int *calloc(maxrow*maxcol, sizeof(int));

    how do you reference the different elements (alternate notation arr[row][col] will not compile). Is pointer...
  14. Replies
    2
    Views
    943

    thanks

    thanks for the response
  15. Replies
    2
    Views
    943

    help with pointers

    Can this be done?

    typedef struct item_s
    {
    int id, amount;
    struct item_s *next;
    } item_t;

    typedef struct cust_s
    {
  16. Replies
    5
    Views
    1,645

    Thanks all. Problem solved.

    Thanks all. Problem solved.
  17. Replies
    2
    Views
    1,213

    more specifically

    I am completely new to this, so please bear with me.
    I'm using Borland C 4.5.
    The array represents a 2D battlefield, with 'units' represented by a single integer in it, or empty.
    The output file...
  18. Replies
    5
    Views
    1,645

    order of multiple test expression?

    I don't want to reference outide my array, so is this test valid, or will the second expression try to evaluate is the first is false?

    if ((row+1 < maxrow) && (array[row+1][col] == EMPTY)

    Also,...
Results 1 to 18 of 18