linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hossein Mobahi <hmobahi@yahoo.com>
To: linux-c-programming@vger.kernel.org
Subject: Re: Pointer
Date: Wed, 18 Aug 2004 15:05:15 -0700 (PDT)	[thread overview]
Message-ID: <20040818220515.52030.qmail@web12702.mail.yahoo.com> (raw)
In-Reply-To: <20040818_210521_080945.r_zaca@ig.com.br>

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

  reply	other threads:[~2004-08-18 22:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-18 21:05 Pointer Ronaldo Zacarias Afonso
2004-08-18 22:05 ` Hossein Mobahi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-08-18 22:06 Pointer Hossein Mobahi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040818220515.52030.qmail@web12702.mail.yahoo.com \
    --to=hmobahi@yahoo.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).