Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. error C2143: syntax error : missing ';' before '*'

error C2143: syntax error : missing ';' before '*'

Scheduled Pinned Locked Moved Managed C++/CLI
c++helpdotnetvisual-studio
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sam Hobbs
    wrote on last edited by
    #1

    I am using VS 2010 Professional. I am getting the error:

    error C2143: syntax error : missing ';' before '*'

    From:

    Unmanaged *pu;

    I assume there is something very simple that I am overlooking. This problem can be easily re-created. I re-created it by creating a Visual C++ CLR Class Librsry project. Then I used the Class Wizard to create an unmanaged class called Unmanaged. Then in the managed Class1 class I added the line shown above. Then I built that without any other changes and got the error. I do not understand why.

    L 1 Reply Last reply
    0
    • S Sam Hobbs

      I am using VS 2010 Professional. I am getting the error:

      error C2143: syntax error : missing ';' before '*'

      From:

      Unmanaged *pu;

      I assume there is something very simple that I am overlooking. This problem can be easily re-created. I re-created it by creating a Visual C++ CLR Class Librsry project. Then I used the Class Wizard to create an unmanaged class called Unmanaged. Then in the managed Class1 class I added the line shown above. Then I built that without any other changes and got the error. I do not understand why.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      There is obviously something missing in your code such that the term Unmanaged is not being correctly interpreted by the compiler. Perhaps if you post your class definition also, someone can figure out what's wrong.

      Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

      S 1 Reply Last reply
      0
      • L Lost User

        There is obviously something missing in your code such that the term Unmanaged is not being correctly interpreted by the compiler. Perhaps if you post your class definition also, someone can figure out what's wrong.

        Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

        S Offline
        S Offline
        Sam Hobbs
        wrote on last edited by
        #3

        I am an idiot. I forgot to #include "Unmanaged.h". I definitely know better but for some reason I did not use my brain.

        L 1 Reply Last reply
        0
        • S Sam Hobbs

          I am an idiot. I forgot to #include "Unmanaged.h". I definitely know better but for some reason I did not use my brain.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Sam Hobbs wrote:

          for some reason I did not use my brain.

          You are now a certified developer; it's something we all do from time to time.

          Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups