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

  • Home
  • SEARCH
  • 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 3308752
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:33:32+00:00 2026-05-17T21:33:32+00:00

Ok so I -roughly- want this code: test1.m: Foo *foo = [[Foo alloc] init];

  • 0

Ok so I -roughly- want this code:

test1.m:

Foo *foo = [[Foo alloc] init];
foo.x = 1.0f;

[staticClass bar:*foo.x];

staticClass.m:

-(void)bar:(float *)argVar
{
  *argVar += 1.0f;
}

So I’m pointing the argVar to a property of the Foo class. Obivously the current code doesn’t work.

What’s the proper syntax for/way to do this?

  • 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-17T21:33:32+00:00Added an answer on May 17, 2026 at 9:33 pm

    I think that the proper way to do it is this:

    float tmp = foo.x;
    [staticClass bar:&temp];
    foo.x = tmp;
    

    and StaticClass.m should look like this:

    +(void) bar:(float *) argvar // < not plus instead of minus, denotes static method
    {
         *argVar = 1.0f;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK so I'm looking a some code which looks roughly like this: void DoSomething(object
I have roughly the following code. Could this be made nicer or more efficient?
I have html code that looks roughly like this: <div id=id1> <div id=id2> <p>some
I've got HTML code that roughly looks like this: <li id=someid-11> <img src=... alt=alt
so i've got this, roughly: <div id=A> <ul> <li id=B>foo</li> </ul> </div> <div id=C>
Unit testing is, roughly speaking, testing bits of your code in isolation with test
I have a an XSD that looks like this (roughly) <xs:schema id=Appointment targetNamespace=http://tempuri.org/Record.xsd elementFormDefault=qualified
This is roughly what I'm trying to do: def post(request): VehicleFormSet = formset_factory(StaffVehicleForm) if
I have a directory with roughly 100000 files in it, and I want to
When designing FPGA systems how can I estimate roughly the number of logic blocks

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.