![]() |
| | #1 |
| Registered User Join Date: Sep 2007
Posts: 2
| sorting with pointer of pointers to array http://i153.photobucket.com/albums/.../untitled-3.jpg i got a dynamic part of D done, (kinda easy, but little crazy with dynamic delete/add :P) then i try and point the pointer of pointers to D... this is where i get confused. i make a pointer of pointer **P and **Q i make the pointer array of D, then make the pointer point to an array of the size of D *P = new int[DSize]; *Q = new int[DSize]; now i get lost... i want to make the *P to make the space for the size D, then i want those pointers, **P, to point to the locations of D, but i can figure it out... i can do it with a single pointer *P, but as soon as i do it with a double pointer P, it wont let me do anything with the dynamic array... i even tried casting it as (int *), which works, but it doesn't change a **** thing. any hints? here is my pathetic attempt to make the make the pointer go to D in my code... *P = D; *Q = D; |
| dunpealslyr is offline | |
| | #2 |
| Cat without Hat Join Date: Apr 2003
Posts: 8,492
| Image link is corrupted.
__________________ All the buzzt! CornedBee"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code." - Flon's Law |
| CornedBee is offline | |
| | #3 |
| Unregistered User Join Date: Jul 2007
Posts: 980
|
__________________ May the Source be with you. |
| Yarin is offline | |
| | #4 | |
| Algorithm Dissector Join Date: Dec 2005 Location: New Zealand
Posts: 2,727
| Quote:
__________________ My homepage Advice: Take only as directed - If symptoms persist, please see your debugger | |
| iMalc is offline | |
| | #5 | |
| Registered User Join Date: Sep 2007
Posts: 2
| Quote: meow!!! its not a duck! :P http://i153.photobucket.com/albums/s...untitled-3.jpg why it didn't work i dont know... maybe this will, its the same link... | |
| dunpealslyr is offline | |
| | #7 | |
| Algorithm Dissector Join Date: Dec 2005 Location: New Zealand
Posts: 2,727
| Image link working now! Quote:
__________________ My homepage Advice: Take only as directed - If symptoms persist, please see your debugger Last edited by iMalc; 10-01-2007 at 11:28 PM. | |
| iMalc is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| array of pointers to an array pointers | onebrother | C Programming | 2 | 07-28-2008 11:45 AM |
| Dynamic array of structures containing yet another dynamic array of structures | innqubus | C Programming | 2 | 07-11-2008 07:39 AM |
| Question regarding Memory Leak | clegs | C++ Programming | 29 | 12-07-2007 01:57 AM |
| Array of Pointers to Arrays | Biozero | C Programming | 2 | 04-19-2007 02:31 PM |
| delete and delete[] | Hunter2 | C++ Programming | 13 | 06-26-2003 04:40 AM |