views:

21

answers:

1

i'm lost in this , i have a class that has three vector objects ,

class A
{
    vector<int> h1;
    vector<double> h2;
    vector <int> h3;
}

i want to have (inherit ) all the vector functions ( push , size etc ) but EXCEPT " erase " function

at first i made the objects public but then erase was available , i donno how inheritance work with vectors template

when i made the objects private .. i found my self overloading all the vector functions again for each object that i have , it's also not good for performance as 2 functions will be called instead of one ,

performance in my program is very critical requirement because there would be thousands of calculations of each function .. and doubling this number will not be good for it at all ..

+1  A: 
Roger Pate
thanks alot man , that was really informative,, and i will sure learn about Blitz++
ismail marmoush