Just to reinforce what others have said -- this is not a good use of inheritance -- Sean and Wintertime lay out the case against it nicely. Its better to have independent vector classes of the common small dimensions 2, 3, and 4, and a general-purpose compile-time/run-time sized vector for larger/arbitrary dimension if you need it.
What you've probably done is misidentified the nature of their shared interfaces and conflated it with a desire for code-reuse. That is, influenced by wanting to reuse the code of vector3, you have assumed that vector4 simply extends it. In reality, vector3 and vector4 do inherit a common interface, but that does not imply that one should inherit from the other -- conceptually they both inherit from a common interface that you have not defined. For completeness, also note that while there is a common interface, it is only a subset of the operations that apply to all vectors (e.g. the cross product only exists for vectors of sizes 3 and 7 (e.g. not for 4, which you are deriving from 3), and there is a psuedo-cross-product in 2 dimensions that's not correct in a mathematical sense but is sometimes useful nonetheless).
Now, before you go off an try to implement this common interface I've spoken of, stop, because its not an idea that's good to take literally. Firstly because the necessary virtual inheritence would kill performance, and secondly because you simply don't use vectors of different dimensions interchangeably very often -- almost never. In such cases, you should either be using that general-purpose runtime-sized vector to begin with, or alternatively a function template can be used to leverage duck-typing, which is essentially a loose, anonymous interface of the type you need here. In cases where they are not used interchangably, but where it seems beneficial to allow a vector4 to act as a vector3 temporarily, its better to provide a conversion operator and/or a vector3 constructor that takes a vector4. Note that when going from a lower to a higher dimension vector you need to be explicit about what the missing coordinate (e.g. W) should be assigned to.