Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am trying to get more experienced with Ogre 3D and I am following the basic tutorials on the website. All the code samples compile just fine.

The first time I encountered an "error" was in Basic Tutorurial 3.

The code line where Visual Studio says something is not right is

mTerrainGroup = OGRE_NEW Ogre::TerrainGroup(mSceneMgr, Ogre::Terrain::ALIGN_X_Z, 513, 12000.0f);

Visual Studio compiles this line but it shows an ugly red line beneath it and on mouse hover it says

#define OGRE_NEW new (__FILE__, __LINE__, __FUNCTION__) Error: no instance of overloaded 'operator new' matches the argument list" or if I mouse hover over Ogre::TerrainGlobalOptions() it says "Error: expected a type specifier

I searched on Google but couldn't find my answer. I got about a year C++ experience but that was mainly with the WinSock libary.

Thanks in advance.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

OGRE_NEW is just an overload of the operator new. Try to replace OGRE_NEW by the normal operator new. If it compiles, there is a problem in the declaration of OGRE_NEW. Otherwise, just find the problem and uses again the OGRE_NEW operator.

Ps: if you use OGRE_NEW, you need to use OGRE_DELETE to remove your allocated object.

share|improve this answer
    
I am going to try out thanks for your anwer. –  automaticoo Feb 23 '11 at 9:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.