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 130971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:01:55+00:00 2026-05-11T06:01:55+00:00

I am using a C++ SDK where there is a function like (it has

  • 0

I am using a C++ SDK where there is a function like (it has a python wrapper, but not docs):

getPos ( int uvId, float & u, float & v ) const  

How do I specify in Python so that the passed variables are changed?

I tried this example to see if I could modify floats inside a function, but it didn’t work, so printed 12.0:

def change ( a ) :      a = 35.0   b = 12.0  change ( b )  print b 

So how do I call this function that I can change 2 external floats in Python?

Related:

  • Python: variable scope and function calls
  • 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. 2026-05-11T06:01:56+00:00Added an answer on May 11, 2026 at 6:01 am

    As far I know, Python doesn’t support call-by-reference, so the exact code you are suggesting doesn’t work (obviously).

    The tool (or person) that generated the Python wrapper for the C++ function must have done something special to support this function (hopefully, or you won’t be able to use it). Do you know what tool was used to generate the wrapper?

    Usually tools like this will generate some sort of container data type:

    b.value = 12.0 change(b) print b.value 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm receiving an H.264 stream from a DVR using its SDK. There were memory
I've problem with exception dialogs: I'm using RemObjects SDK for Client/Server -application. When there's
I'm using Facebook JS SDK to develop a Facebook Page Tab application. There is
tl;dr: No, there isn't a way. Calling publish_action using the JS SDK is actually
Is there a way to print, via the SDK (I'm using qbXML and the
I’m using Facebook’s JavaScript SDK to do something like FB.api('/1234567890/events', 'POST', { name: My
I am trying to convert a function from a camera SDK I am using
I am developing an iPad application using sdk 5 and storyboard. I´m following the
I have developed a simple application using SDK(Android: 3.2[API-13]) for, to display Google banners.
I am running ARtoolkit on Mac OS X Lion (using SDK 10.5, as per

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.