delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/08/28/03:47:51

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Simple program. Strange results.
Date: 28 Aug 2003 07:14:27 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 20
Message-ID: <bika4j$nbn$1@antares.lu.erisoft.se>
References: <HfZ2b.3213$cQ1 DOT 755278 AT kent DOT svc DOT tds DOT net> <hO%2b.16285$8i2 DOT 341 AT newsread2 DOT news DOT atl DOT earthlink DOT net> <tHc3b.3480$cQ1 DOT 829301 AT kent DOT svc DOT tds DOT net> <200308280125 DOT h7S1PFP5020856 AT envy DOT delorie DOT com>
NNTP-Posting-Host: lws256.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

DJ Delorie (dj AT delorie DOT com) wrote:
: >   From what I can grasp, the asterisk symbol means the same thing.
: > Though I have yet to really grasp the proper place(s) and form(s)
: > for its usage.

: Nope, asterisk is the inverse of ampersand.  Ampersand takes the
: address of something, converting values into pointers that point to
: those values.  Asterisks dereference pointers, turning pointers into
: the values they point to.

Except when you declare/define variables and functions. Then * takes
the place where newbies would expect &.

Then comes C++ where & is allowed in declarations/definitions too
(with some semantics I've never bothered to look up; I don't do C++).


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019