linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Pointer
@ 2004-08-18 21:05 Ronaldo Zacarias Afonso
  2004-08-18 22:05 ` Pointer Hossein Mobahi
  0 siblings, 1 reply; 3+ messages in thread
From: Ronaldo Zacarias Afonso @ 2004-08-18 21:05 UTC (permalink / raw)
  To: linux-c-programming

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 556 bytes --]

  Hello everyone, 

  This is a newbie´s question, but if someone could help me! 
  How can I assign an address value to a pointer, for example: I need a 
pointer that points to address 0x12345, so I can manipulate the content of 
that address. 
  Is it possible? 
  Can anybody help me? 

  Thanks! 

_________________________________________________________________________________
Quer mais velocidade?
Só com o acesso Aditivado iG, a velocidade que você quer na hora que você precisa.
Clique aqui: http://www.acessoaditivado.ig.com.br


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Pointer
  2004-08-18 21:05 Pointer Ronaldo Zacarias Afonso
@ 2004-08-18 22:05 ` Hossein Mobahi
  0 siblings, 0 replies; 3+ messages in thread
From: Hossein Mobahi @ 2004-08-18 22:05 UTC (permalink / raw)
  To: linux-c-programming

Hi

You must not only determine the address, but also the
data type. In fact, a vaule in a memory location can
have a different types and its correct interpretation
is not possible unless its type in known. Here is an
example for integer type:

main()
{
  int *x ;
  ...
  ...
  x=(int *) 0x1234 ; // Set the pointer
  *x=1 ; // Set its content (integer)
}

Hope it helps

--Hossein

--- Ronaldo Zacarias Afonso <r_zaca@ig.com.br> wrote:

>   Hello everyone, 
> 
>   This is a newbie´s question, but if someone could
> help me! 
>   How can I assign an address value to a pointer,
> for example: I need a 
> pointer that points to address 0x12345, so I can
> manipulate the content of 
> that address. 
>   Is it possible? 
>   Can anybody help me? 
> 
>   Thanks! 
> 
>
_________________________________________________________________________________
> Quer mais velocidade?
> Só com o acesso Aditivado iG, a velocidade que você
> quer na hora que você precisa.
> Clique aqui: http://www.acessoaditivado.ig.com.br
> 
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Pointer
@ 2004-08-18 22:06 Hossein Mobahi
  0 siblings, 0 replies; 3+ messages in thread
From: Hossein Mobahi @ 2004-08-18 22:06 UTC (permalink / raw)
  To: linux-c-programming

Hi

You must not only determine the address, but also the
data type. In fact, a vaule in a memory location can
have a different types and its correct interpretation
is not possible unless its type in known. Here is an
example for integer type:

main()
{
  int *x ;
  ...
  ...
  x=(int *) 0x1234 ; // Set the pointer
  *x=1 ; // Set its content (integer)
}

Hope it helps

--Hossein

--- Ronaldo Zacarias Afonso <r_zaca@ig.com.br> wrote:

>   Hello everyone, 
> 
>   This is a newbie´s question, but if someone could
> help me! 
>   How can I assign an address value to a pointer,
> for example: I need a 
> pointer that points to address 0x12345, so I can
> manipulate the content of 
> that address. 
>   Is it possible? 
>   Can anybody help me? 



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-18 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-18 21:05 Pointer Ronaldo Zacarias Afonso
2004-08-18 22:05 ` Pointer Hossein Mobahi
  -- strict thread matches above, loose matches on Subject: below --
2004-08-18 22:06 Pointer Hossein Mobahi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).