Conversion error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pirad13
    New Member
    • Jul 2008
    • 2

    Conversion error

    Hi, I'm doing an internship and I've been asking to debug a program that I barely understand. While compiling it, i've several errors that occurs all along the compilation.

    The first one says:

    processings.cc( 299) : error C2440: '=' : cannot convert from 'void (__cdecl *)(const Real64 &,const Real64 &,const GuidanceInput &,...)' to 'int'
    This conversion requires a reinterpret_cas t, a C-style cast or function-style cast.

    Do you have any idea where it comes from?

    Thx
  • oler1s
    Recognized Expert Contributor
    • Aug 2007
    • 671

    #2
    You are posting error lines without corresponding code lines. You really think we can help you here? The most we can do is point you to the generic principle behind the error: http://msdn.microsoft.com/en-us/library/sy5tsf8z.aspx

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Look at line 299 of processings.cc.

      It looks like you are trying to assign the return value of a function to an int. Except the function has a void return so there's not int to assign. LIke this:
      [code=cpp]
      void MyFunction(int arg);

      int i = MyFunction(30); //ERROR MyFunction does not return an int
      [/code]

      Comment

      • pirad13
        New Member
        • Jul 2008
        • 2

        #4
        Well in fact the problem comes from somewhere else. My three errors are all linked together I think. If I solve the first one it should be good:

        d:\Stage\pegase \simu_dev\simu\ genFW\Root_Airc raft_FCSys.h(96 ) : error C2079: 'NS_Pegase::Roo t_Aircraft_FCSy s::_run_flight_ models' uses undefined class 'boost::functio n<Signature>'

        which reffers to the following line of Root_Aircraft_F CSys.h(96):

        boost::function <void (const Real64& , const Real64& , const Navigation& , const Int32& , const Int32& ,... )> _run_flight_mod els;

        Comment

        Working...