Tutorial 8 at 3d fundementals i get C2512 error

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
aslanbey0158
Posts: 52
Joined: April 15th, 2017, 10:48 am

Tutorial 8 at 3d fundementals i get C2512 error

Post by aslanbey0158 » June 11th, 2018, 9:04 pm

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?
Attachments
CubeSkinScene.h
(1.8 KiB) Downloaded 132 times

MrGodin
Posts: 721
Joined: November 30th, 2013, 7:40 pm
Location: Merville, British Columbia Canada

Re: Tutorial 8 at 3d fundementals i get C2512 error

Post by MrGodin » June 12th, 2018, 12:22 am

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

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 );
	}
}

Otherwise you need to call CudeSkinScene CSScene(add constructor data here);
Hope this helps
Curiosity killed the cat, satisfaction brought him back

Post Reply