gcc 4.4.4 c89 I have the following function but I cannot free the memory. The message I get in Valgrind is suspecting the getline function. However, I am free the file pointer at the end of the funct
I\'m trying to implement a ring buffer with the following struct /*head, tail are indexes of the head and tail of ring buffer
I am having a confusing issue -- for me at least, this may be very simple and I am missing something. I am trying to initialize a 2D array开发者_JAVA百科 of variable size, The array is a part of a str
My question\'s pretty basic, but it\'s been a while. I\'m reading in a text file and saving numbers in the text to a struct \'Record\'. After I read text to my Record buffer, I want to place it in an
I\'m very new to C and I decided to make a function called str_replace which replaces strings inside strings which have been made using malloc. It appears to work but can anyone find any room for impr
I\'m struggling to find why I can\'t free a memory block. Something must be wrong with the pointer. A memory block for a structure is made in a function and the pointer used is stored in an array. Lat
This question already has answers here: Closed 12 years ago. Possible Duplicate: Is there any danger in calling free() or delete instead of delete[]?
A lot of c/malloc()\'s in a for/while/do can consume a lot of time so I am curious if any operating system buffers memory for fast mallocs.
In my program I am trying to resize array using malloc function. #include <stdio.h> int main(void)
I\'ve written code that should ideally take in data from one document, encrypt it and save it in another document.