| | |
Dynamic Memory Allocation of Array of Structures.
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
•
•
Storing values before allocating memory for 'em? I will be surprised if it works.
C++ Syntax (Toggle Plain Text)
records** myarray; myarray = new records*[numRecords]; for(int i = 0;i < numRecords;i++) myarray[i] = new records; (*myarray[2]).title = "w/e";//same as... myarray[2]->title = "w/e";
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
![]() |
Similar Threads
- Help with Resizing structs! (C++)
- Help with function (C++)
- Double-linked list in contiguous memory. (C)
- Dynamic Memory Allocation (C)
Other Threads in the C++ Forum
- Previous Thread: simple thread question
- Next Thread: calling multiple DLLs in CLR
| Thread Tools | Search this Thread |
api application array arrays based binary c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count database delete deploy desktop developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game generator givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





