Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C4430 Pin
T.RATHA KRISHNAN31-Jul-08 3:30
T.RATHA KRISHNAN31-Jul-08 3:30 
GeneralRe: C4430 Pin
Iain Clarke, Warrior Programmer31-Jul-08 3:33
Iain Clarke, Warrior Programmer31-Jul-08 3:33 
GeneralRe: C4430 Pin
T.RATHA KRISHNAN31-Jul-08 3:41
T.RATHA KRISHNAN31-Jul-08 3:41 
GeneralRe: C4430 Pin
Iain Clarke, Warrior Programmer31-Jul-08 4:34
Iain Clarke, Warrior Programmer31-Jul-08 4:34 
GeneralRe: C4430 Pin
CPallini31-Jul-08 3:38
mveCPallini31-Jul-08 3:38 
GeneralRe: C4430 Pin
T.RATHA KRISHNAN31-Jul-08 3:44
T.RATHA KRISHNAN31-Jul-08 3:44 
GeneralRe: C4430 Pin
CPallini31-Jul-08 3:46
mveCPallini31-Jul-08 3:46 
GeneralRe: C4430 Pin
T.RATHA KRISHNAN31-Jul-08 3:51
T.RATHA KRISHNAN31-Jul-08 3:51 
Here it is:

The function I want to declare is inside a namespace. It's coded like this:

namespace dtAI
{
void AICharacter::GoToWaypoint(float dt, const Waypoint* pWaypoint)
   {  
      //simple... just rotate to the waypoint over time and set a
      //positive velocity to go there
      mCharacter->RotateToPoint(pWaypoint->GetPosition(), dt * 3.0f);            

      //osg::Vec3 pVector = pWaypoint->GetPosition() - GetPosition();

      //pVector [2] = 0.0f;

      //float dir = std::abs(osg::RadiansToDegrees(atan2(pVector[0], -pVector[1])) - mCharacter->GetRotation());

      //while(dir >= 360.0f) dir -= 360.0f;

      //std::cout << dir << std::endl;
      //if(dir < 5.0f)
      //{
      mCharacter->SetSpeed(-float(mSpeed));

      if(!mCharacter->IsAnimationPlaying("Run"))
      {
         mCharacter->ClearAllAnimations(0.5f);
         mCharacter->PlayAnimation("Run");
      }
      //}
      //else
      //{
      //   mCharacter->SetVelocity(0.0f);
      //}
   }

   osg::Vec3 AICharacter::GetPosition() const
   {
     osg::Matrix mat = mCharacter->GetMatrixNode()->getMatrix();  
     osg::Vec3 pos(mat(3, 0), mat(3, 1), mat(3, 2));
     return pos;
   }
}


This function is declared in the header file under public section as below :


void GoToWaypoint(float dt, const Waypoint* pWaypoint);



I've to declare the function in some other header file. I can comment the function in the first file. When I declare the function in the second file, I got the above mentioned errors. What to do?
QuestionRe: C4430 Pin
CPallini31-Jul-08 4:02
mveCPallini31-Jul-08 4:02 
AnswerRe: C4430 Pin
T.RATHA KRISHNAN31-Jul-08 4:08
T.RATHA KRISHNAN31-Jul-08 4:08 
GeneralRe: C4430 Pin
Alan Balkany31-Jul-08 3:42
Alan Balkany31-Jul-08 3:42 
QuestionExcel automation compatibility problem Pin
followait31-Jul-08 1:26
followait31-Jul-08 1:26 
AnswerRe: Excel automation compatibility problem Pin
vikas amin31-Jul-08 11:34
vikas amin31-Jul-08 11:34 
Questionexe name Pin
sunit531-Jul-08 0:30
sunit531-Jul-08 0:30 
AnswerRe: exe name Pin
sunit531-Jul-08 2:27
sunit531-Jul-08 2:27 
AnswerRe: exe name Pin
Randor 31-Jul-08 10:17
professional Randor 31-Jul-08 10:17 
GeneralRe: exe name Pin
sunit531-Jul-08 18:37
sunit531-Jul-08 18:37 
QuestionProblem with friend keyword Pin
T.RATHA KRISHNAN30-Jul-08 23:39
T.RATHA KRISHNAN30-Jul-08 23:39 
AnswerRe: Problem with friend keyword Pin
CPallini30-Jul-08 23:49
mveCPallini30-Jul-08 23:49 
GeneralRe: Problem with friend keyword Pin
T.RATHA KRISHNAN30-Jul-08 23:56
T.RATHA KRISHNAN30-Jul-08 23:56 
GeneralRe: Problem with friend keyword Pin
CPallini31-Jul-08 0:03
mveCPallini31-Jul-08 0:03 
GeneralRe: Problem with friend keyword Pin
T.RATHA KRISHNAN31-Jul-08 0:11
T.RATHA KRISHNAN31-Jul-08 0:11 
GeneralRe: Problem with friend keyword Pin
CPallini31-Jul-08 0:17
mveCPallini31-Jul-08 0:17 
GeneralRe: Problem with friend keyword Pin
T.RATHA KRISHNAN31-Jul-08 0:21
T.RATHA KRISHNAN31-Jul-08 0:21 
GeneralRe: Problem with friend keyword Pin
CPallini31-Jul-08 0:36
mveCPallini31-Jul-08 0:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.