You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
Not sure about types you used but as far as I know inside the SMeshBuffer and CMeshBuffer vertices are stored as an array of Vertex objects (S3DVertex for example). getVertices() returns an array - pointer to its firs element, so now you are probably trying to cast S3DVertex* to IVertexBuffer*. I think it's not going to work.
Sorry, I dont know what IVertexBuffer are used for, cuz Im using Irrlicht for about 2 weeks.
Oh and its better to use c++ style casting (****_cast) if you deal with something else than built in types.
This isn't possible in current Irrlicht implementation, but You can use this Irrlicht branch for it: https://irrlicht.svn.sourceforge.net/sv ... -pipeline/
in this way:
IMeshBuffer_Object->setVertexBuffer(IMeshBuffer_OtherObject->getVertexBuffer());
But, remember that FVF support (branch from a link) for Irrlicht is in testing phase, so some bugs may appear.