Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

c++ pointer fuckery

Name: Anonymous 2013-01-01 17:07

I need some help.

I'm working on a project that requires a dynamically-sized 2D array of object pointers. How would I go about creating such a thing? I'd like to go with C-style arrays (though if vectors would be easier I'll try it). Would I need to use a triple pointer? Also, I need each element in the array to be NULL when the array is allocated.

Name: IGBO MOHAMMED 2013-01-01 17:08

HOW DO I POINTER???????

PLS HELP I GIVE U 200 RUPEES THX

Name: Anonymous 2013-01-01 17:10

>>2
I'm just looking for the most efficient way to handle this.

Name: Anonymous 2013-01-01 17:17

Hash functions.

Name: IGBO MOHAMMED 2013-01-01 17:24

I AM THE MOST NGGER RICH

Name: Anonymous 2013-01-01 17:25

>>4
How the hell would hash functions help with a 2D array?

Name: Anonymous 2013-01-01 17:26

Yes, void***.

Learn to malloc please.

Name: IGBO MOHAMMED 2013-01-01 17:28

>>2
>>5
I AM IGBO MOHAMMED, MINISTER OF INTERNET NIGERIA!
I REQUIRE KNOWING OF 100 PROGRAMMERS!
I REQUIRE KNOWING OF 1000 MANAGER!

Name: Anonymous 2013-01-01 17:31

>>1
Your 2D array will be an 1D array.  Nobody allocates N arrays of M for NxM.  Allocate an array of size N*M instead.

>>7
Never in my life used a triple pointer.  Double pointer is very common however.

Name: Anonymous 2013-01-01 17:40

Name: Anonymous 2013-01-01 17:50

boost::multi_array

Name: Anonymous 2013-01-01 17:50

>>6
#define faggothash(i, j, m) (i*m+j)

For m by n matrix.

Name: Anonymous 2013-01-01 18:49

use vectors idiot

Name: Anonymous 2013-01-01 19:19

>>13
Use a better language idiot

Don't change these.
Name: Email:
Entire Thread Thread List