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. Product Lifecycle
  3. Collaboration / Beta Testing
  4. Can some one please help me out....

Can some one please help me out....

Scheduled Pinned Locked Moved Collaboration / Beta Testing
helpc++
2 Posts 2 Posters 12 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.
  • N Offline
    N Offline
    nounou
    wrote on last edited by
    #1

    hello, I am trying to compile a source code written in MFC(Microsoft Foundation Class) language. I am continuesly facing an error called C2664: cannot convert parameter 1 from 'class CRobot' to 'class CRobot *' It says also : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called. I tryed to overload both "constructor" and "=". But it doesn´t help. I think it is simple compiler error but I´m not able to solve it. If you need to see the code please let me know and I´ll send it to you. (nounouladanoise@yahoo.fr) Thanx a lot. Inés :(( :(( :(( :(( :(( :(( :((

    R 1 Reply Last reply
    0
    • N nounou

      hello, I am trying to compile a source code written in MFC(Microsoft Foundation Class) language. I am continuesly facing an error called C2664: cannot convert parameter 1 from 'class CRobot' to 'class CRobot *' It says also : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called. I tryed to overload both "constructor" and "=". But it doesn´t help. I think it is simple compiler error but I´m not able to solve it. If you need to see the code please let me know and I´ll send it to you. (nounouladanoise@yahoo.fr) Thanx a lot. Inés :(( :(( :(( :(( :(( :(( :((

      R Offline
      R Offline
      Roger Allen
      wrote on last edited by
      #2

      The compiler is telling you it needs a pointer to an object, not an actual object. Try calling the fucntion like this:

      CRobot robot;

      ...
      SomeFunction(&robot); // pass pointer to object, not actual abject

      Roger Allen Sonork 100.10016 Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003

      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