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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:34:06+00:00 2026-05-14T16:34:06+00:00

in C++, the following means allocate memory for an int pointer: int* number; So,

  • 0

in C++, the following means “allocate memory for an int pointer”:

int* number;

So, the asterisk is part of the variable type; without it, that would mean “allocate memory for an int”.

Then, wouldn’t it make more sense if the following meant “allocate memory for two int pointers”?

int* number1, number2;
  • 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-14T16:34:07+00:00Added an answer on May 14, 2026 at 4:34 pm

    Stroustrup was asked this and he said (paraphrasing)

    • if you think more C-ish you will say int *a and Employee *pE
      (so in your head you’re thinking “the content of a is an integer”)
    • if you think more C++-ish you will say int* a and Employee* pE
      (so in your head it’s “a is an integer pointer”)

    You can think however you like, as long as you never declare two
    pointers on the same line.

    Works for me. I’m an Employee* pE kind of person, but I’m married to an Employee *pE kind of person – my advice would be not to get too worked up about it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Could not allocate memory My following code runs fine: double weight [600]
Suppose i define the following code: int *func() { int *p=(int *)malloc(sizeof(int)); // memory
In my mind, always, definition means storage allocation. In the following code, int i
What does the following means ? find myDirectory -name myFile -exec ls \-ln {}
Can any one tell me? what does following means in ruby program: obj =
Please tell me what the following sentence means in ' The Zen of Python
I have looked here and from what I understand the following regex simply means
I use the following call to openCV function to perform K-means algorithm: cvKMeans2(points, count,
Please have a look at the following machine code ‎0111001101110100011100100110010101110011011100110110010101100100 This means something. I
I require a means of checking to see if a string has the following

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.