Book a Demo

Author Topic: Problem with reverse engineering C++  (Read 2437 times)

susana

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Problem with reverse engineering C++
« on: November 10, 2006, 12:14:00 am »
Hi All,
   I am busy reverse engineering some C++ code and it is failing. I have a .cpp file which has an include statement in it
#       include "write.H"

in "write.H" the code looks like:

if (runTime.outputTime())
   {     ----------------line 2
      zdgzdgsdg
       srgdfgdfg
    }


EA fails with the message

"There was an error parsing write.H on line 2.  Unexpected symbol: {"

Has anyone experienced this before? Any help will be really appreciated.


Thanks a lot,
Susan.

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: Problem with reverse engineering C++
« Reply #1 on: November 10, 2006, 01:15:01 am »
Code in header files ???

susana

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Problem with reverse engineering C++
« Reply #2 on: November 10, 2006, 01:21:00 am »
sorry, thought that might not be the problem. In this problem occurs throughout the code not only in this particular instant. All the errors have got to do with the "}".  After looking throught the posts here, I tried defining a macro in EA , but this does not seem to work.  Please help. Code in include file below.





if (runTime.outputTime())
   {
       volVectorField gradT = fvc::grad(T);

       volScalarField gradTx
       (
           IOobject
           (
               "gradTx",
               runTime.timeName(),
               mesh,
               IOobject::NO_READ,
               IOobject::AUTO_WRITE
           ),
           gradT.component(vector::X)
       );

       volScalarField gradTy
       (
           IOobject
           (
               "gradTy",
               runTime.timeName(),
               mesh,
               IOobject::NO_READ,
               IOobject::AUTO_WRITE
           ),
           gradT.component(vector::Y)
       );

       volScalarField gradTz
       (
           IOobject
           (
               "gradTz",
               runTime.timeName(),
               mesh,
               IOobject::NO_READ,
               IOobject::AUTO_WRITE
           ),
           gradT.component(vector::Z)
       );

 }
       runTime.write();