# What is int**

Page 1 of 1

## 6 Replies - 1026 Views - Last Post: 04 January 2012 - 08:07 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=261907&amp;s=10ecc8d72cb8667a64609f095a8910a8&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

• D.I.C Regular

Reputation: -7
• Posts: 470
• Joined: 14-April 11

# What is int**

Posted 04 January 2012 - 11:40 AM

hi what is the meaning of int**
normally int * means pointer to integer. but I dont know int **

I am a beginer...
Is This A Good Question/Topic? 0

## Replies To: What is int**

### #2 jimblumberg

Reputation: 5459
• Posts: 16,986
• Joined: 25-December 09

## Re: What is int**

Posted 04 January 2012 - 11:46 AM

It means a pointer to a pointer to an int.

Jim

### #3 Invisibledeath

Reputation: 7
• Posts: 79
• Joined: 13-March 10

## Re: What is int**

Posted 04 January 2012 - 02:33 PM

jimblumberg, on 04 January 2012 - 11:46 AM, said:

It means a pointer to a pointer to an int.

Jim

Exactly that. However if you want to simplify **int this write it like this *(*int) Look at order of operations and you get pointer to int pointer.

### #4 ishkabible

• spelling expret

Reputation: 1747
• Posts: 5,898
• Joined: 03-August 09

## Re: What is int**

Posted 04 January 2012 - 02:48 PM

when did the '*' type operator become a prefix operator?

### #5 jimblumberg

Reputation: 5459
• Posts: 16,986
• Joined: 25-December 09

## Re: What is int**

Posted 04 January 2012 - 03:05 PM

Quote

when did the '*' type operator become a prefix operator?

So maybe I'm dyslexic. (corrected the title I gave this thread when I split it from another topic).

Jim

This post has been edited by jimblumberg: 04 January 2012 - 03:21 PM
Reason for edit:: Fixed Title

### #6 r.stiltskin

• D.I.C Lover

Reputation: 2030
• Posts: 5,430
• Joined: 27-December 05

## Re: What is int**

Posted 04 January 2012 - 03:14 PM

I guess ishkabible's mysterious comment refers to the fact that the question in post #1 was about int** (which jimblumberg answered), but the topic title and Invisibledeath's post both refer to **int.

When you declare a variable, for example
```int** ppi;
```

you are declaring a pointer to a pointer to an int.

On the other hand a line of code that begins with
```**int
```

is invalid and will evoke a compiler error message.

On the other (third?) hand, if I have already declared a variable int** ppi and assigned a valid value to it **ppi will dereference the pointer so
[code]cout << **ppi << endl;[/il]
will print the int value that is pointed to by the int pointer that is pointed to by the "pointer to pointer to int" ppi,

edit: OK, now someone's making me seem dyslexic. When I started this post, the topic heading was What is **int, but now it's been edited to What is int**.

This post has been edited by r.stiltskin: 04 January 2012 - 03:18 PM

### #7 ishkabible

• spelling expret

Reputation: 1747
• Posts: 5,898
• Joined: 03-August 09

## Re: What is int**

Posted 04 January 2012 - 08:07 PM

Quote

I guess ishkabible's mysterious comment refers to the fact that...

ya; sorry I was a bit unclear. the type system has type constructors(pointer, function, array, etc...) that take the form of operators(that look like closely related data operators). the type constructor to make a pointer is a post-fix unary operator(unlike the dereference operator which is prefix). so i called the pointer constructor a "type operator" and asked when it became prefix to contrast reality. so ya, you hit the nail on the head.

This post has been edited by ishkabible: 04 January 2012 - 08:12 PM