TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: PHIL OHL
from: PETER HAYWOOD
date: 1998-04-19 03:53:00
subject: Re: Pointer

Groovy hepcat Phil Ohl jived with All on 27 Mar 98  12:27:27!
Pointer's a cool scene. Dig it!
 PO> I am having a minor problem getting pointers to work correctly for
 PO> me. I have made A pointer something like.
 PO> void admin::raise(employee *luckyperson)
 PO> {
 PO> luckyperson->salary *= 1.75;
 PO> }
 PO> and I call the function in main.
  I'm assuming the function is public.
 PO> admin1 raise(employee1);
  What is employee1? Is it a pointer to employee, or an actual
object of type employee? It must be a pointer. If not, then the
address of the object must be passed, not the object itself, eg.:
admin1.raise(&employee1);
  Also you seem to have left out a dot, calling the function thusly
classname funcname(...);
instead of like this
classname.funcname(...);
                                                  Wolvaen
... I will not use abrev. - Bart's Board
--- Blue Wave/RA v2.20
---------------
* Origin: The Gate, Melbourne Australia, +61-3-9809-5097 33.6k (3:633/159)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.