Is Vim editor very smart?
Vim is without a shadow of a doubt, the best editor in the world (Come get me emacs guys). Flame wars aside, what I have found incredibly useful for both C++ and Java programming is eclipse (best IDE in the world, yes now I am poking Netbeans) with the vrapper plugin. You get all the benefits of a fully integrated development environment and the power of vim keyboard shortcuts.
Vrapper doesn't give you full vim emulation but you can bounce around your code using vim shortcuts and you don't loose any of the goodness of eclipse.
What you're looking for is ctags and tags/TAGS files. Ctags (I recommend Exuberant Ctags) is a program which scans source files for identifiers and creates a file indexing them. You can then use ^] to jump to the definition for the tag under the cursor.
There may be some additional details needed to tell vim how to find the tags file; I'm not sure off-hand what they are. But that's the general idea - run ctags over your source code and then use ^].
Alternatively, you may wish to look at GNU Global. It's a bit more sophisticated. But ctags will accomplish what you've described.