Search:

Type: Posts; User: shawn_drn

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    1,294

    To answer my own question, yes the storage is...

    To answer my own question, yes the storage is static. No, do not free it.
  2. Replies
    1
    Views
    1,294

    gethostbyname

    //begin code section 1
    h_test = gethostbyname(TEST);
    if(h_test==NULL) {
    exit(1);
    }
    //end code section 1
    tbox_addr.sin_family = h_test->h_addrtype;
    memcpy((char *)...
  3. Replies
    1
    Views
    1,315

    \ in preprocessor directives

    Hello,
    Can anyone tell me what the point of the \ is at the end of preprocessor directives? You often see them in #define clauses, but the compiler I use doesn't care whether they are there or not.
  4. Replies
    2
    Views
    2,302

    char* vs char[]

    Can someone explain the difference between these two? The first results in a Null Pointer Exception when operating on the string.



    char *x = "abcde";

    char x[] = "abcde";
  5. Replies
    6
    Views
    1,437

    Function returning a function

    Hello,
    I have a class using a hash table. The constructor of the hash table takes as parameters the number of buckets, a pointer to a hash function, and a pointer to a comparison function. My...
  6. Replies
    2
    Views
    930

    Thanks a lot, I'm able to get it two work now...

    Thanks a lot, I'm able to get it two work now that I use the string copy function. it's off putting because you often see things like

    x = "blah";

    where x is of type char*
  7. Replies
    2
    Views
    930

    **char problems in C

    Hello,
    I need to write a function as follows:

    //return a list of all the names d has
    char** ls(directory* dir);

    struct directory{
    char* name;
    int num_of_files;
    struct directory...
Results 1 to 7 of 7