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. C / C++ / MFC
  4. error C2143: syntax error : missing ',' before '*'

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

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpvisual-studiotutorialquestion
6 Posts 4 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
    subramanyeswari
    wrote on last edited by
    #1

    Hi, I am compiling the legacy code in VS.Net 2008 64 bit platform. I am getting the above error in the following line

    static HRESULT copy(destination_type* pTo , const int source_type* pFrom)

    how to resolve the above error? Please help me Regards

    S K U 3 Replies Last reply
    0
    • S subramanyeswari

      Hi, I am compiling the legacy code in VS.Net 2008 64 bit platform. I am getting the above error in the following line

      static HRESULT copy(destination_type* pTo , const int source_type* pFrom)

      how to resolve the above error? Please help me Regards

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      What are destination_type and source_type meant to be? Also - "const int source_type* pFrom" looks wrong no matter what source_type is (unless it is nothing)

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      S 1 Reply Last reply
      0
      • S Stuart Dootson

        What are destination_type and source_type meant to be? Also - "const int source_type* pFrom" looks wrong no matter what source_type is (unless it is nothing)

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        S Offline
        S Offline
        subramanyeswari
        wrote on last edited by
        #3

        This is the definition

        template <class MapType, class DestinationType = MapType::referent_type>

        and source type is defined as

        typename MapType::value_type source_type;

        what is wrong here?

        S 1 Reply Last reply
        0
        • S subramanyeswari

          Hi, I am compiling the legacy code in VS.Net 2008 64 bit platform. I am getting the above error in the following line

          static HRESULT copy(destination_type* pTo , const int source_type* pFrom)

          how to resolve the above error? Please help me Regards

          K Offline
          K Offline
          KarstenK
          wrote on last edited by
          #4

          get out to what the original types are solved.:confused: Try to make the first or the second paramater to void* to check which parameter is the error.:~

          Press F1 for help or google it. Greetings from Germany

          1 Reply Last reply
          0
          • S subramanyeswari

            This is the definition

            template <class MapType, class DestinationType = MapType::referent_type>

            and source type is defined as

            typename MapType::value_type source_type;

            what is wrong here?

            S Offline
            S Offline
            Stuart Dootson
            wrote on last edited by
            #5

            const int source_type* pFrom

            You have two types in that parameter declaration. Let us say that source_type is std::string - that translates to

            const int std::string* pFrom

            That doesn't make sense, now, does it?

            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

            1 Reply Last reply
            0
            • S subramanyeswari

              Hi, I am compiling the legacy code in VS.Net 2008 64 bit platform. I am getting the above error in the following line

              static HRESULT copy(destination_type* pTo , const int source_type* pFrom)

              how to resolve the above error? Please help me Regards

              U Offline
              U Offline
              User 7993193
              wrote on last edited by
              #6

              I figured out why it doesn't work in visual studio c++. Here is the correct code I used to fix my error C2143: #include "Wave.h" /* This header file has the CWave class in it */ CWave *wave1; int main() { wave1.Load(_T("C:...\Music.wav")); wave1.Play(); Sleep(100000); }

              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