Search Results

Search found 3 results on 1 pages for 'gurugio'.

Page 1/1 | 1 

  • Memory allocation included in API

    - by gurugio
    If there is the 'struct foo' and an APIs which handle foo, which is more flexible and convenient API? 1) API only initialize foo. User should declare foo or allocate memory for foo. The this style is like pthread_mutex_init/pthread_mutex_destroy. example 1) struct foo a; init_foo(&a);' example 2) struct foo *a; a = malloc(sizeof(struct foo)); init_foo(a); 2) API allocates memory and user get the pointer. This is like getaddrinfo/freeaddrinfo. example) struct foo *a; get_foo(&a); put_foo(a);

    Read the article

  • How to study programming with C language

    - by gurugio
    I am using only C for 5 years. So I am sure that I know C grammer, but I have no idea how to advance programming skills. There are many books for modern languages (such as C++, Java) to study programming skills like the refactoring or pattern, software architecture. But no book is written with C language. The book author say that his/her book is not language-dependent, but I don't think so. How can I advance my programming skills? I have to study modern language and read the books? Are there books about software design or programming skill written with C?

    Read the article

  • How to find where error is.

    - by gurugio
    How can I find where the error occurs? In C language, the return value means what error occurs, such as failure to open file or memory allocation. There is no information where the error occurs. For example, function 'foo' calls A,B,C,D. If foo returns an error value, it might be return value of A or B or C or D. I cannot find what function returns error. I have to run debugger or add some codes to find what function returns error.

    Read the article

1