at Tutorial 8:
i get that error:
C2512: 'CubeSkinScene' no appropriate default constructor available
in memory file
My CubeSkinScene file is attached.
What should i do?
Tutorial 8 at 3d fundementals i get C2512 error
-
- Posts: 52
- Joined: April 15th, 2017, 10:48 am
Tutorial 8 at 3d fundementals i get C2512 error
- Attachments
-
- CubeSkinScene.h
- (1.8 KiB) Downloaded 132 times
Re: Tutorial 8 at 3d fundementals i get C2512 error
seems you might be calling an instance of CudeSkinScene as follows ?
CudeSkinScene CSScene.. looks as though it can only be declared with its constructor data
Otherwise you need to call CudeSkinScene CSScene(add constructor data here);
Hope this helps
CudeSkinScene CSScene.. looks as though it can only be declared with its constructor data
Code: Select all
class CubeSkinScene : public Scene
{
public:
typedef Pipeline::Vertex Vertex;
public:
CubeSkinScene() = default; // NEW and will not work because Scene need to be initialized//
CubeSkinScene( Graphics& gfx,const std::wstring& filename )
:
itlist( Cube::GetSkinned<Vertex>() ),
pipeline( gfx ),
Scene( "Textured Cube skinned using texture: " + std::string( filename.begin(),filename.end() ) )
{
pipeline.BindTexture( filename );
}
}
Hope this helps
Curiosity killed the cat, satisfaction brought him back