Search:

Type: Posts; User: glennik

Search: Search took 0.00 seconds.

  1. Replies
    10
    Views
    1,208

    No, I disagree. The standard is the lowest common...

    No, I disagree. The standard is the lowest common denominator, and there are several system where this feature is in fact overridden.

    Plus, working on legacy systems, the compiler it may even...
  2. Replies
    10
    Views
    1,208

    Yes, according to the 6.7.8 (10) of the C99...

    Yes, according to the 6.7.8 (10) of the C99 standard. But, as always, there might be compiler specific options which overrides this. Therefor you cannot assume things like this and always initialize...
  3. Replies
    2
    Views
    2,235

    Look at the %d scanf format and the type of the...

    Look at the %d scanf format and the type of the variable contch.
  4. Replies
    31
    Views
    4,540

    Poll: These casts are not unnecessary, but rather...

    These casts are not unnecessary, but rather highly clarifying, indicating that that this is a willed and controlled cast. In a such low rigid language like C, where you basically are allowed to do...
  5. When the objects a linked, a global symbol table...

    When the objects a linked, a global symbol table is created in the executable. In this symbol table, the exported symbols have capital letters, while non exported symbols have small letters. Look at...
  6. If a type of that name is already defined, you...

    If a type of that name is already defined, you should get a compiler warning / error (use the pedantic flag). If the header where its defined is not used in your project, it should not be a problem,...
  7. You have not provided a type, just a definition,...

    You have not provided a type, just a definition, the correct declaration is:



    struct
    {
    tbaAmtType bigLimitAmt;
    longDescType longDesc;
    tba800ErrorMsgType ...
  8. Replies
    19
    Views
    6,338

    Then, I believe he is referring to statically...

    Then, I believe he is referring to statically linking of the resources that you are using in your code, and not runtime libraries. I assume that you have some limitations regarding OS etc. (eg. you...
  9. Replies
    19
    Views
    6,338

    Usually, when referring to external dependencies,...

    Usually, when referring to external dependencies, you refer to dll or other resources that YOUR code is actually using, and not the linking of runtime libraries, which always is required in a runtime...
  10. Compared to what you are referring to, using a...

    Compared to what you are referring to, using a class scope variable with public access, would i C be using an extern decalaration, which is pretty much the opposite of what I stated.

    However, I...
  11. Replies
    12
    Views
    5,806

    No, its not, you are allocating totalFiles, which...

    No, its not, you are allocating totalFiles, which is the input, times 10 which is the size of one element the array times the size of the element type.

    However, you are right about the pointer to...
  12. Replies
    12
    Views
    5,806

    itCbitC: I does not matter if changes the...

    itCbitC: I does not matter if changes the paramters, the calloc statement is still wrong. The sizeof(char**) will yield 4, which is the size of the pointer and not the sizeof an element in the multi...
  13. Replies
    12
    Views
    5,806

    Oh..., you are doing all sorts or errors. First...

    Oh..., you are doing all sorts or errors. First of all, you need to learn the difference between arrays and pointers, second you need to understand the difference between multidimmensional arrays and...
  14. Replies
    8
    Views
    2,665

    Short answer, you can't. to do what you want,...

    Short answer, you can't.

    to do what you want, you can

    memcpy((void*)root->num, (void*)newNum, sizeof(newNum));

    which implies that newNum is an array and not a pointer. If newNum is a pointer...
  15. Global variables requires a carefull mind of the...

    Global variables requires a carefull mind of the programmer, but its not necessarily bad design. The same applies to goto, which is highly useful in error correction in the lack of better methods,...
  16. Replies
    7
    Views
    3,448

    From my point of view, which can be cluttered by...

    From my point of view, which can be cluttered by the fact that the the type node is not presented, is that you are handling the pointers wrong, which will result it random i values. The obvoius...
  17. Replies
    4
    Views
    2,396

    I've not compiled or run your code, but the most...

    I've not compiled or run your code, but the most obvious error is that you do not initialize the buffer to zero, and using character based printout device you can suffer from any kind unpredicatble...
  18. Replies
    15
    Views
    3,146

    You can use a union, its just these kind of...

    You can use a union, its just these kind of purposes its ment for:



    typedef union
    {
    unsigned char b[2];
    unsigned short c;
    } byteArr_t;
  19. Thread: with Function

    by glennik
    Replies
    3
    Views
    1,279

    Use function pointers

    You can use functions pointers to store references to functions, which will work across code spaces (files, libraries etc). The fuctions pointers can be stored in variables, structures, tables etc....
Results 1 to 19 of 19