But it doesn'twork, it says expecting type, got 'vector'.
Is it possible to create a vector of vectors, if not what do you sudgest as an alternative?
(I can't use an array, the memory storage I requier needs a varriable storage capacity)
Thanks in advance,
You didn't instantiate the template in the second vector:
vector<vector<this_bit_is_missing>>
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
G++ will compile the code in the new c++0x mode, that was added in the 3.3 release. G++ supports some smaller pieces of the upcoming standard in that mode.
edit: actually it is the 4.3 release (not 4.4 as I wrote before).
Okay, this just shows us again how un-compliant VC++ is now
Let's be fair here, imho this is a good thing. I guess it would (it at least should) actually warn you about the non-compliant code if you turn up the warnings, etc...
bluecode wrote:Let's be fair here, imho this is a good thing.
Please explain?
I assume, that there is a switch to turn on warnings for non-ISO (C++98 or C++03) compliant code like this, but I don't know actually, because I don't use VC++. Just like gcc's -std=c89, -std=c99, -std=c++98 and the new -std=c++0x. None of these options is the default for compilation with gcc either. The default currently is -std=gnu89 and -std=gnu++98. So basically what I am trying to say is, that gcc/g++ allows you to write non-compliant code by default (VC++, too), but there is an option to turn on warnings/errors (I assume there is for VC++, too).
Plus, it will be in the upcoming standard anyway (C++0x).
vector of vector don't sound crazy at all.
ivt and idt have frequentlly this.
for example, the int10h have many sub vectors.
int80h in linux have a lot of sub vectors.
if there are a lot of sub vectors ( more than 3 ), the best is the lookup table because of optimal execution. it is faster to make this than to make a string of cmp + je ???