vector<VecInt> L(Lp2, a);
As mentioned, this creates a temporary variable within the ctor, which has nothing to do with your member variable. Try this instead:
L = vector<VecInt>(Lp2, a);
However, you really should do this initialization with initializer lists:
lVector(int p1, int p2) : Lp1(p1), Lp2(p2), L(Lp2, vector<int>(Lp1)) {}
Here a temporary vector is created as a "prototype" for the inner dimension, and gets copied several times for initializing the nested vector. The syntax of the initializer items is straightforward: follow each member to be initialized with a constructor argument list in brackets (or in the case of primitives, an expression to evaluate - the primitives are treated as if they were POD structs with the copy ctor being used, basically). Note that this is an optimization where possible, because it specifies how the members will be constructed, whereas such construction happens anyway before any code inside the ctor body - assigning to a member in the ctor simply overwrites a default-initialized value. (Unless of course the compiler is smart enough to optimize it away...) Also note that because of the scoping rules, you can do this sort of thing:
myThing(type member): member(member) {}// in "member(member)", the 'member' outside the brackets must necessarily be// this->member, because other variables can't be referenced there - you can// only initialize things that are part of the object being initialized. But// inside the brackets, the scoping is the same as inside the ctor body.