Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6829747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:32:11+00:00 2026-05-26T22:32:11+00:00

I have 2 classes CVKinectWrapper.cpp and main.cpp . In the CVKinectWrapper, in the bool

  • 0

I have 2 classes CVKinectWrapper.cpp and main.cpp. In the CVKinectWrapper, in the bool CVKinectWrapper::update(){ ... i have a variable XnSkeletonJointPosition righthand; I would like to access this variable in the main.cpp class. therefor i have created a

`void CVKinectWrapper::getRightHand(XnSkeletonJointPosition *righthand){
  //*righthand = righthand;

  righthand->copyTo(*righthand);
}`

The direct assignment doesn’t work, i get this error = ‘No match for ‘operator=’ in*righthand=righthand‘.
The copyTo doesnt work because the datatype of righthand hasn’t got this method.

For extra info :

This is how i access the wrapper in the main class = CVKinectWrapper *wrapper = CVKinectWrapper::getInstance();

 wrapper->getRightHand(XnSkeletonJointPosition *righthand)

My question now is how can i access the righthand variable from the CVKinectWrapper in the main class.

This is probably a very basic question but i’m rather new to c++.
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:32:11+00:00Added an answer on May 26, 2026 at 10:32 pm

    When asking about compiler errors, it is usually a good idea to provide the exact error message, which in this case it probably states what the types of the two arguments are. At any rate, I think I can guess what the problems are.

    You mention that you have a variable named righthand, which I assume is actually a member of the class, and you want to copy the value to a different variable passed to the function getRightHand. Now the problem is that the argument of the function has the same name as the member, and it is shadowing it. Inside getRightHand, the identifier righthand refers to the argument, not to the member. You can solve this by either changing the name of the argument or qualifying the access to the member: *righthand = this->righthand;

    As of the particular error message, the operation *righthand = righthand; literally means assign the value of the pointer righthand (argument to the function) to the object that it points, which does not make much sense. From a design point of view, the function as it is is quite un-idiomatic in C++, and should probably be replaced by:

    const XnSkeletonJointPosition& CVKinectWrapper::getRightHand() const {
      return righthand;
    }
    

    And the caller would do:

    XnSkeletonJointPosition res = wrapper.getRightHand();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have classes structured like this: Public MustInherit Class A ' several properties End
I have classes like this one: class SomeObject { public function __construct($param1, $param2) {
In the projects I worked on I have classes that query/update database, like this
I have classes like this public class someList { public string strOne {get; set;}
Say I have classes declared like this: public abstract class IdentifiableEntity { public boolean
Say I have classes Foo and Bar set up like this: class Foo {
Right now I have classes like: abstract class Record { // Required fields val
I have classes which are inherited from abstract Packet( this class has abstract method
I have classes that are structured like the following: public class Forecast { [Key]
I have classes like these: class MyDate { int year, month, day; } class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.