Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
allocating
- Page 1
Re: ASUS Laptops - my experience
Hardware and Software
1 Month Ago
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
1 Month Ago
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
1 Month Ago
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
14 Years Ago
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
14 Years Ago
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
10 Years Ago
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
13 Years Ago
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
11 Years Ago
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
11 Years Ago
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
15 Years Ago
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
15 Years Ago
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
15 Years Ago
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
15 Years Ago
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
15 Years Ago
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
15 Years Ago
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
14 Years Ago
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
14 Years Ago
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
14 Years Ago
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
14 Years Ago
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
13 Years Ago
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
12 Years Ago
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
12 Years Ago
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
11 Years Ago
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
11 Years Ago
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
14 Years Ago
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
14 Years Ago
by MrNoob
yes it's .cpp
Re: Allocating memory for 3D array with two dimensions of fixed size
Programming
Software Development
10 Years Ago
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
10 Years Ago
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
10 Years Ago
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
10 Years Ago
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…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC