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

Pages: 1-

yo dawg

Name: Anonymous 2010-11-03 18:54

I'm mentally fucked right now and need to get the first item from 1 array of type T in 1 class into a pointer of type T in another

first class is bag<T>
I have a function to return data[0] called T bag<T>getFirst


now into the sequence class
bag<T>* a = new bag<T>;
T* = a.getFirst();

seq.cpp:6: error: request for member `getFirst' in `((sequence<int>*)this)->sequence<int>::a', which is of non-class type `bag<int>*'


I feel dum

Name: Anonymous 2010-11-03 18:55

oh also inb4 vectors... can't use those on this project

Name: Anonymous 2010-11-03 18:56

also insert a name for the T* of whatever you like

Name: Anonymous 2010-11-03 19:35

you are a bad programmer

Name: Anonymous 2010-11-03 20:08

Bags are not ordered.

Name: Anonymous 2010-11-03 20:22

>>5
which is why I'm just using the dynamic array portion of the bag... I know how that sounds but still...
I need to be able to recall the address of the first element but it wont let me

Name: Anonymous 2010-11-03 20:32

a->getFirst() not a.getFirst()?

Name: Anonymous 2010-11-03 21:02

>>7
I LOVE YOU I FUCKING LOVE YOU

Name: Anonymous 2010-11-03 21:34

>>7,8
Sigh

Name: Anonymous 2010-11-03 21:46

>>9
HE HELPED HIM

Name: Anonymous 2010-11-03 22:19

Bus Error (core dumped)

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

how does i fail at pointer arithmetic?

Name: Anonymous 2010-11-03 23:06

Bus Error (幻想郷にバス無い)

Name: Anonymous 2010-12-27 0:07

Name: Anonymous 2013-09-01 14:32


Ancient cultures had various ideas about the nature of infinity. The ancient Indians and Greeks, unable to codify infinity in terms of a formalized mathematical system, approached infinity as a philosophical concept.

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