Re: Pointer question.
From: Alf P. Steinbach (alfps_at_start.no)
Date: 03/27/05
- Next message: Barry Schwarz: "Re: Pointer question."
- Previous message: Anthony Borla: "Re: meaning of static within a namespace?"
- In reply to: Gregory L. Hansen: "Pointer question."
- Next in thread: Barry Schwarz: "Re: Pointer question."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 27 Mar 2005 00:04:43 GMT
* Gregory L. Hansen:
>
> I want to check on something. For a float, f and a pointer to float,
> fptr, are the statements
>
> *fptr = f;
Assigns to the float that fptr points to.
> fptr = &f;
Assigns to fptr the address of f.
If you now do
*fptr = 3.14;
you assign 3.14 to f because fptr now points to (contains the address of) f.
> the same thing?
No.
-- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
- Next message: Barry Schwarz: "Re: Pointer question."
- Previous message: Anthony Borla: "Re: meaning of static within a namespace?"
- In reply to: Gregory L. Hansen: "Pointer question."
- Next in thread: Barry Schwarz: "Re: Pointer question."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|