LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-19-2006, 03:34 PM   #1
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 12.1, 2.6.24.5
Posts: 185

Rep: Reputation: 30
pointers names with one and two asterisks?


Hi All!

I saw pointers with one and two asterisks, like this:

*pointer_name
**pointer_name

Can anyone tell me what do the two asterisks stand for?
I tried looking up, but didn't find anything useful.

Thanks
 
Old 03-19-2006, 03:58 PM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, Ubuntu, OpenBSD
Posts: 1,004

Rep: Reputation: 36
One asterisk is for a pointer as you seem to know and then, following the pattern here, two asterisks mean it's a pointer to a pointer ofcourse
 
Old 03-19-2006, 03:59 PM   #3
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 46
- nevermind -
 
Old 03-19-2006, 04:00 PM   #4
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,352

Rep: Reputation: 129Reputation: 129
You need to look at how they are defined. However one possible solution would be that the second is an array of pointers, and so the first asterisk dereferences to the first element in the array, whilst the second will dereference to the actual data pointed at by the first element.

If that was the case the following would be identical

Code:
*pointer[0]
**pointer
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel preemption error installing Zaptel for Asterisks neutrin0 Linux - Software 1 11-13-2005 01:10 AM
font + asterisks password childish Linux - Newbie 9 06-24-2005 03:24 PM
converting string to asterisks pantera Programming 2 09-13-2004 01:27 PM
How to search for asterisks using gawk dtheorem Linux - General 1 03-05-2004 02:35 PM
Linux...Modems...Asterisks PBX tadd Linux - Hardware 0 12-02-2003 08:32 AM


All times are GMT -5. The time now is 06:48 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration