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. A problem

A problem

Scheduled Pinned Locked Moved Managed C++/CLI
helpc++question
3 Posts 3 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.
  • M Offline
    M Offline
    minihotto
    wrote on last edited by
    #1

    I create a windows form apllication, p2pport. My form file name is Dlg.I get some errors. error C2027: use of undefined type 'p2pport::CParams' error C2227: left of '->setValue' must point to class/struct/union/generic type in Dlg.cpp params->setValue("Y", "123"); in my Dlg.h file #include "params.h"; namespace p2pport { using namespace System; ............................... public ref class Dlg : public System::Windows::Forms::Form { CParams* params; } } in my param.h file class CParams{ void setvalue(char* k, char* v); } in my params.cpp void CParams::setValue(char* k, char* v){ ..... return; } Can anybody tell me what's wrong with it? Appreciate your reply. Jane

    L G 2 Replies Last reply
    0
    • M minihotto

      I create a windows form apllication, p2pport. My form file name is Dlg.I get some errors. error C2027: use of undefined type 'p2pport::CParams' error C2227: left of '->setValue' must point to class/struct/union/generic type in Dlg.cpp params->setValue("Y", "123"); in my Dlg.h file #include "params.h"; namespace p2pport { using namespace System; ............................... public ref class Dlg : public System::Windows::Forms::Form { CParams* params; } } in my param.h file class CParams{ void setvalue(char* k, char* v); } in my params.cpp void CParams::setValue(char* k, char* v){ ..... return; } Can anybody tell me what's wrong with it? Appreciate your reply. Jane

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      minihotto wrote:

      Can anybody tell me what's wrong with it?

      Jane one of your compiler errors....

      minihotto wrote:

      error C2027: use of undefined type 'p2pport::CParams'

      "use of undefined type" is a beginner level error. Using forums to learn novice programming skills is sub-optimal. I strongly urge you to find some novice level books for programming and learn from them. When you need help understanding something from a book you can post the statement you don't understand in a forum and ask for clarification.

      1 Reply Last reply
      0
      • M minihotto

        I create a windows form apllication, p2pport. My form file name is Dlg.I get some errors. error C2027: use of undefined type 'p2pport::CParams' error C2227: left of '->setValue' must point to class/struct/union/generic type in Dlg.cpp params->setValue("Y", "123"); in my Dlg.h file #include "params.h"; namespace p2pport { using namespace System; ............................... public ref class Dlg : public System::Windows::Forms::Form { CParams* params; } } in my param.h file class CParams{ void setvalue(char* k, char* v); } in my params.cpp void CParams::setValue(char* k, char* v){ ..... return; } Can anybody tell me what's wrong with it? Appreciate your reply. Jane

        G Offline
        G Offline
        George L Jackson
        wrote on last edited by
        #3

        Jane, please note: 1. C++ and C++/CLI are case-sensitive. 2. C++ and C++/CLI classes are private by default. 3. Your CParams class is not int the p2pport namespace 4. Please use more descriptive subject line. 5. Don't disregard Mike's comments. -- modified at 19:49 Wednesday 7th November, 2007

        "We make a living by what we get, we make a life by what we give." --Winston Churchill

        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