To answer my own question, yes the storage is static. No, do not free it.
Type: Posts; User: shawn_drn
To answer my own question, yes the storage is static. No, do not free it.
//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 *)...
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.
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";
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...
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*
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...