Basically I've got a const string (it stays the same lenght) Only trying to implement it into OOP.

heres the constructor:

score::score(void)
{
	lives = 5;
	char * end = 
	{
	" --------------+-\n"
	" +             |\n "
	"+             ?\n"
	" +\n"
	" +\n"
	" +\n"
	" +\n"
	};

		strcpy( death, end);

}

but the program fails to run when I excute it, so kinda stuck and puzzled.

probably should be char end[] = not char * = . Also, where is death defined (and how big is it?)

probably should be char end[] = not char * = . Also, where is death defined (and how big is it?)

when I try and compile it with that i get:

main.obj : error LNK2001: unresolved external symbol "public: char * __thiscall score::dead(void)" (?dead@score@@QAEPADXZ)
Debug/main.exe : fatal error LNK1120: 1 unresolved externals

post your score class and we will take a look for you. there isnt enough code to help there. It appears that maybe you have forgotten to write a member func or something similar.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.