Re: ASUS Laptops - my experience Hardware and Software by toneewa … updates, and create a system restore point, then an image. Allocating enough space for the partitions can help prevent running into… Re: ASUS Laptops - my experience Hardware and Software by Reverend Jim … probably losing skills faster than I acquire new ones ;-) >Allocating enough space for the partitions can help prevent running into… Re: Bouncing Balls: Creating a new ball when two balls collide Programming Software Development by toneewa … freeze you mentioned. It was memory heap space and array allocating. E.g., if x or y becomes negative, and also… allocating 2d array Programming Software Development by MrNoob oke I was coding some stuff involving 2d array allocating i normally know how to do it in main coz … should show all 0 but it shows first i made allocating ptr to ptr then after that in loop i made… Re: allocating 2d array Programming Software Development by MrNoob anyways thanks i get where did i go wrong stupid me :D since i m allocating my inner array as rows i should have went i < rows not i < cols thanks it works now. Allocating memory for 3D array with two dimensions of fixed size Programming Software Development by MonsieurPointer … must be a modifiable lvalue**. How would I go about allocating memory for it? Is it even possible? If so, what… Re: Allocating a 3D array Programming Software Development by Ancient Dragon [code] struct matrix* InitMatrix(int x, int y, int z) { struct matrix* m = malloc(sizeof(struct matrix)); // initialize the structures elements <snip> return m; } [/code] Free it in reverse orderof allocating it. Re: Allocating a dynamic array Programming Software Development by np complete Array hold is created but not initialised with any values. When you dereference hold, it spits out garbage value. You must initialize int array hold first after dynamically allocating it. Re: Problem in allocating a structure. Programming Software Development by Schol-R-LEA … simple: first off, you are only allocating one structure's worth of memory in…*pointers*, which is not what you are allocating. You want to pass it as an array…MyStruct = (struct _MyStruct*)calloc(array_size, sizeof(struct _MyStruct)); /* Allocating MyStruct */ if (MyStruct == NULL) { printf("Memory error… Dynamically allocating 2d arrays Programming Software Development by bondo … and what I've been able to read about dynamically allocating arrays and such I'm doing this correctly. Does anyone… Re: Dynamically allocating 2d arrays Programming Software Development by Narue … that sizeof(char) is guaranteed to be 1. Finally, when allocating memory for a string, you need to add an extra… Re: Dynamically allocating 2d arrays Programming Software Development by bondo … I was doing in the other function, except for the allocating memory part, so I was getting confused as to why… Better way of allocating a memory( auto_ptr vs new vs malloc) Programming Software Development by ronan_40060 … conObj.CopyToDceSYS_LC_DETAILS_CDA(p_str_lc_details,pStrLcDetails); Which is the better way of allocating . auto_ptr score well above the rest as the object gets… Re: Better way of allocating a memory( auto_ptr vs new vs malloc) Programming Software Development by Freaky_Chris … there needed to be a way of calling constructers when allocating memory) which is a big bonus. Other than that, as… dynamically allocating memory-malloc Programming Software Development by CPPRULZ … have been studying the malloc and calloc functions for dynamically allocating memory. I thought the form was: [code=C] (data_type*) malloc… Freeing a dynamically allocating struct Programming Software Development by vaibhav2614 … I allocate the word field of this struct, I am allocating this dynamically as well (using strdup). Now when I want… Problem allocating new memory and calling functions Programming Software Development by gerti13 …;new" call (so to speak) I get an error allocating memory. If someone can take a look and please suggest… Re: Problem allocating new memory and calling functions Programming Software Development by jonsca … either you're running over the filename array (or not allocating any room for it in the first place having no… Re: Problem allocating new memory and calling functions Programming Software Development by gerti13 … either you're running over the filename array (or not allocating any room for it in the first place having no… Issue allocating memory for calling function Programming Software Development by n1csaf3 I am having trouble correctly allocating memory for a parent function that will remain upon the … Dynamically allocating a two dimensional array returns an error. Programming Software Development by sinatra87 … constant expression for every dimension after the first when dynamically allocating space for an array. Is there any way to get… Array withou allocating memory? Programming Software Development by desup … tried to do just that: [CODE]int[] anArray;[/CODE] Without allocating memory, Im getting error: The local variable anArray may not… Problem in allocating a structure. Programming Software Development by Perry31 …$"; _MyStruct *MyStruct; MyStruct = (_MyStruct*)calloc(1,sizeof(struct _MyStruct));//Allocating MyStruct printf("String with 123 code: %s", a… dynamically allocating two dimensional array and fill with random numbers Programming Software Development by prathiyus … size of col"); scanf("%d",&c); //allocating memory a = (int**)malloc (r*sizeof(int*)); for(i = 0… Re: allocating 2d array Programming Software Development by Salem The allocate and free of your inner loops are wrong. [code] BOOL AllocateMemory(int ***iArray,int rows,int cols) { *iArray = calloc(rows,sizeof(int[COLOR="Red"][B]*[/B][/COLOR])); if(!*iArray) return false; for(int i =0;i < [COLOR="Red"]rows[/COLOR];i++) { (*iArray)[i] = calloc(cols,… Re: allocating 2d array Programming Software Development by MrNoob yes it's .cpp Re: Allocating memory for 3D array with two dimensions of fixed size Programming Software Development by vijayan121 #include <iostream> #include <memory> #include <vector> int main() { typedef double corner_points_t[4][3] ; // using corner_points_t = double[4][3] ; std::size_t n = 15 ; // curves.size() // option one: low-level memory management - raw pointer sematics, messy… Re: Allocating memory for 3D array with two dimensions of fixed size Programming Software Development by MonsieurPointer Thank you for your reply, but that is not the answer I was looking for. What would be the call if I did not use a typedef (and using only the new operator)? Re: Allocating memory for 3D array with two dimensions of fixed size Programming Software Development by deceptikon > Thank you for your reply, but that is not the answer I was looking for. I suspect the answer you're looking for is unreasonable. A better solution is to fix your design such that you don't need to wade into the shithole of pointers to arrays. For example, using a class for your bounding box and then having an array of objects of that class. … Re: Allocating memory for 3D array with two dimensions of fixed size Programming Software Development by vijayan121 > What would be the call if I did not use a typedef (and using only the new operator)? int main() { std::size_t n = 15 ; // curves.size() double (*corner_points)[4][3] = new double [n][4][3] ; // using corner_points is perfectly natural; use it as you // would use any array of three dimensions…