linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Pointer to int
@ 2004-07-21 21:11 Ronaldo Zacarias Afonso
  2004-07-21 23:14 ` Luiz Fernando N. Capitulino
  2004-07-22  5:21 ` canbaby
  0 siblings, 2 replies; 3+ messages in thread
From: Ronaldo Zacarias Afonso @ 2004-07-21 21:11 UTC (permalink / raw)
  To: linux-c-programming

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


  Hello everybody, 

  I'm iniciating in the C programming language and there are some things 
that I realy need to understand, so the question is: 

  In the code: 

  int i; 
  struct some_struct *ptr; 

  ptr = &some_other_struct; 

  i = (int) ptr; 


  1) Is the last sentence a valid one? 
  2) If it is, what is realy happening? 

note - It seems very stranger to me. A struct pointer being "transformed" 
into a int variable. 

  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

end of thread, other threads:[~2004-07-22  5:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-21 21:11 Pointer to int Ronaldo Zacarias Afonso
2004-07-21 23:14 ` Luiz Fernando N. Capitulino
2004-07-22  5:21 ` canbaby

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).