|Thank you for answering. the code is huge around 100 lines. |
:+D Don't worry about posting 100 LOC, people here frequently post much more than that. Also there are sites like pastebin at which you can post lots of code - just provide a link to it in your post.
Having said that, one only needs to post the relevant bits - declaration, definition and the context of how it is called.
Also, if you have compiler errors, post them in full or at least show the lines number they refer to.
Sorry not help with your problem - I have forgotten how to do Eigen values, but you could have a look on wiki, or Google.
Finally, there is lots of reference info at the top left of this page - for some reason people seem to miss this.
Any way - Good luck with your coding !! :D
Edit: I forgot to mention the debugger - which is usually the best way of discovering run time problems.