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

Pages: 1-

Vector bullshit

Name: C++ is retahded 2008-03-30 21:27

#include <vector>

typedef struct
{
      int a;
} t_struct;


class t_Class
{
      vector <t_struct> v_Vector;
}


It tells me that ISO C++ forbids declaration of 'vector' with no type.  What the hell is the problem here?  I've tried all sorts of different shit but I can't make the fucking vector somehow.

Name: Anonymous 2008-03-30 21:30

namespaces

Name: Anonymous 2008-03-30 22:14

wait what?

Name: Anonymous 2008-03-30 22:19

>>2
haskell namespaces

Name: Anonymous 2008-03-30 22:22

>>4
haskell nomads

Name: Anonymous 2008-03-30 22:24

>>1
using namespace std
or the more preferable

      std::vector <t_struct> v_Vector;

Name: Anonymous 2008-03-30 22:25

>>6
Or, better yet,
using std::vector

Name: Anonymous 2008-03-30 22:28

>>7
I'm not a C++ programmer, so I don't know if importing the namespace into the current namespace is common practise, or referring to the package manually with each reference to something within it. In Haskell one just imports the whole namespace and resorts to qualifying or specific naming "namespace.symbol" (analogous to "namespace::symbol") when there are conflicts.

Name: Anonymous 2008-03-30 22:36

>>8
For the most part, I don't import individual symbols into the global namespace (except for some certain hacks springing forth from multiple inheritance which require it, hur hur hur bad OOP design). It was merely an attempt at a light, playful troll.

Really, the OP should just use C and call it a day.

Name: Anonymous 2008-03-30 22:40

C++ is no longer relevant. Your argument is invalid.

Name: C++ is retahded 2008-03-31 0:09

[quote=9]Really, the OP should just use C and call it a day.[/quote]

You may be right.

Name: C++ is retahded 2008-03-31 0:20

Alright, now who do I have to kill for someone to tell me how to use the 1337 vector operations with the [b]struct[/b] 's members.

Name: sage 2008-03-31 1:01

>>11-12
Sage is immune to your feeble attempts at trolling.

Name: Anonymous 2008-03-31 15:38

I don't habeeb it.

Name: Anonymous 2009-08-17 0:24

Lain.

Name: Anonymous 2011-02-04 16:43


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