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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:27:37+00:00 2026-05-23T03:27:37+00:00

I am just trying to print out UInt16 pointer to my log, So i

  • 0

I am just trying to print out UInt16 pointer to my log, So i can see its contence… however thus far am not having any sucsess, dose anyone know how to do this, I am thinking its the format specifier but because I dont have alot of experience with this type of thing I just dont know. the warning I am getting is “initialization discards qualifiers from pointer target type”

//....
    [nissanCode seekToFileOffset: 2];
    dataBuffer = [nissanCode readDataOfLength:SETSIZE];
    UInt16 *ans = dataBuffer.bytes;
    UInt16 a = *ans;
    NSLog (@"Data = %@", a);
//....

//Revised code that clears the warning and prints data out fine. thanks for the help guys.

//....
    [nissanCode seekToFileOffset: 2];
    dataBuffer = [nissanCode readDataOfLength:SETSIZE];
    const UInt16 *ans = dataBuffer.bytes; 
    NSLog (@"Data = %d", a);
//....
  • 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-23T03:27:38+00:00Added an answer on May 23, 2026 at 3:27 am

    try using for int’s

    NSLog(@"Data = %d", a);
    

    or for your UInt16’s (thanks to @bshirley for the list of format specifiers below)

    NSLog(@"Data = %hu", a);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to print out just the non-empty strings in a list. I can't
I am trying to print out the name of the month not the integer
I am trying just to print out the value of argc using the CommandLineToArgvW
How can I print out a 2D array in ARM assembly? I'm trying to
Just your standard C primer program. I'm trying to print out a histogram of
I am trying to connect QWebpage::windowCloseRequested() to a slot that just prints out a
Just trying to get my head round Spring and figuring out how I wire
Just trying to establish whether prototype can do something like $$('#ID a:last').css('color','#111'); Any ideas
I'm currently trying to print out a history of movements for players in a
I have two string variables ticker and detail. I'm trying to print out the

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.