Archived

This topic is now archived and is closed to further replies.

Mkk

Problem with something..

Recommended Posts

I have static member variable: static Block *firstBlock; And method:
GLvoid Block::DeleteAll()
{
	Block *thisBlock;
	Block *deleteBlock;

	if (firstBlock == NULL)
		return;

	thisBlock = firsBlock; // This line gives those errors..

      // Without line above everything works ok.


	while (thisBlock != NULL)
	{

	}
}
(Both belongs to the same class) when I try to put firstBlock to the thisBlock, compiler will give me errors: C:\OPENGL PROJECT1\classBlock.cpp(61) : error C2065: ''firsBlock'' : undeclared identifier C:\OPENGL PROJECT1\classBlock.cpp(61) : error C2440: ''='' : cannot convert from ''int'' to ''class Block *'' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast Error executing cl.exe. But without that line everything works ok so what could be the problem?

Share this post


Link to post
Share on other sites
Hehe, yes, it really looks like the last piece of my brains have just started to melt up.

Just in time I couldn´t figure out anything better (what can you except if I can´t even find variable typo myself? ). Sorry.



Share this post


Link to post
Share on other sites