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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:54:31+00:00 2026-05-22T22:54:31+00:00

How to assign the values for the parameters. Rs232MsgRawEncoded(const int nMsgId,const INT8U* pSrc=NULL,unsigned int

  • 0

How to assign the values for the parameters.

Rs232MsgRawEncoded(const int nMsgId,const INT8U* pSrc=NULL,unsigned int nSize=0);

I have declared the above cpp method declaration in Objective C as the following

-(id)initWithRS232MsgRawEncoded:(const int)nMsgId withpSrc:(const uint8_t*)pSrc withSize:(unsigned int)nSize;

Inside the function i’m checking whether its null or with some value.

I could not able to declare the variables as pSrc=NULL and nSize=0 in the Objective C
Is there any 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-22T22:54:32+00:00Added an answer on May 22, 2026 at 10:54 pm

    Objective-c (as well as c) does not support default parameters for functions.

    So you can either use the function you have and pass all parameters to it every time. If you don’t – create new functions with some parameters omitted and call your ‘main’ function with default parameters inside, e.g.:

    -(id)initWithRS232MsgRawEncoded:(const int)nMsgId{
        return [self initWithRS232MsgRawEncoded:nMsgId withpSrc:NULL withSize:0];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The code below gets the values I have entered for my report parameters in
I have a fixed-size array declared: int vals[25]; And I'd like to send the
How can I assign values of the textbox to the datagridview cell ?
I'm trying to assign values contained in a lookup table to multiple variables by
At the moment my code looks like this: # Assign values for saving to
If I want to declare a vector of unknown size, then assign values to
How do I assign initial values to fields inside a ModelForm? eg: class Form1(forms.Form):
Can I assign the values to datagridview cells at a time like datagridview1[0,0].value =
For the sake of convenience I am trying to assign multiple values to a
A TreeNode class has Text Name Tag I need to assign more values to

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.