Hi,
I'd like to open some files (let's say 50) and i thought to put pointers to those files in an array. I have the following declaration:
tab = (FILE**) calloc(num_of_files, sizeof(FILE*));
...
http://www.experts-exchange.com/Programming/Languages/CPP/Q_20092949.html
Zones:
C++Date Answered: 03/17/2001 Grade: A Views: 0
Hello everyone,
I'm creating a MFC DLL which will be called by a C app. I need to dynamically create/resize structure arrays so Im using calloc/resize/free. While calloc seems to work fine for...
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_CPP/Q_21897818.html
Hi!
Here as an example of what I'm trying to do:
void string_copy(char *target_ptr);
void main(void)
{
char *p1="";
string_copy (p1);
printf (p1);
}
void string_copy (char ...
http://www.experts-exchange.com/Programming/Languages/C/Q_20494090.html
Zones:
CDate Answered: 02/03/2003 Grade: A Views: 0
I am an undergraduate student in computer engineering, I am trying to understand why the following code gives a "Segmentation fault" in Run-time. What I know about segmentation fault is that it occ...
http://www.experts-exchange.com/Programming/Misc/Q_20642521.html
#define SIZE 0xFFFFFFF
unsigned int *buffer0 = (unsigned int*)calloc(SIZE, sizeof(unsigned int));
unsigned int *buffer1 = (unsigned int*)calloc(SIZE, sizeof(unsigned int));
unsigned int *buff...
http://www.experts-exchange.com/Programming/Languages/CPP/Q_21322548.html
Zones:
C++Date Answered: 02/21/2005 Grade: A Views: 0
hello
How do I reallocate memory for an array whose memory was allocated using the calloc function? Here is my test code:
#include "stdafx.h"
#include <iostream>
using namespace std;
i...
http://www.experts-exchange.com/Programming/Languages/CPP/Q_21946390.html
Zones:
C++Date Answered: 08/07/2006 Grade: A Views: 0
I'm taking a C-programming course this term and my instructor did not explain the use and syntax of calling the calloc function very well. My question is, does a statement that calls calloc to gene...
http://www.experts-exchange.com/Programming/Languages/C/Q_10041907.html
Zones:
CDate Answered: 03/06/1998 Grade: A Views: 4
Hi all,
Is malloc allocates sequential chunk and calloc doesn't?
if so how and why?
With Regards,
...
http://www.experts-exchange.com/Programming/Languages/C/Q_20880798.html
Zones:
CDate Answered: 05/20/2004 Grade: A Views: 15
char **info = NULL; /* global var */
int getInfo(char **x)
{
...
...
x = (char **)calloc(10, sizeof(char *));
for(i = 0;i < 10; i++)
{
x[i] = (char *)calloc(10,siz...
http://www.experts-exchange.com/Programming/Languages/C/Q_20956168.html
Zones:
CDate Answered: 04/16/2004 Grade: B Views: 0
Hi all,
I have the following code:
struct sockaddr_in *Array;
Array = (struct sockaddr_in *) calloc(2, sizeof(struct sockaddr_in));
This code compiles just fine with gcc3.3.3, but wit...
http://www.experts-exchange.com/Programming/Languages/C/Q_21360237.html