Hi,
If you mean that you want to run Castalia in GUI mode through OMNeT
then I am 95% sure that you cannot do it or it will be extremely
difficult. TIP: My tip is in this group search write "GUI Castalia".
Read the first 2 threads, I hope you will get broader idea.
If this reply satisfy you then I will let you know how to start
programming in Castalia (as you asked where to put C++ code etc.).