🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #12841

Re: Estructuras por socket

#12841
From: Jesús Carrete Montaña
Date: Mon, 07 May 2001 06:03
32 lines
2433 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "The" == The Rocker <DiegoCG@teleline.es> writes:

    The> No es por molestar, pero...  Alguien podria explicar los * y
    The> & de ahi abajo?  Que haces con (void *)&asdf

        & es un operador que puesto como prefijo del nombre de una
variable nos da su direcci�n de memoria (es decir, un puntero a la
variable). * es su antagonista el operador de indirecci�n, que puesto
antes de un puntero nos da acceso a la variable a la que apunta. *
tambi�n se utiliza para declarar punteros.
        El (void *) (cuesti�n de claridad del c�digo, porque en
realidad podr�a funcionar sin �l) hace un cast o conversi�n del
puntero a struct MyStruct a puntero a void, esto es, un puntero a
cualquier tipo de dato (o mejor dicho, un puntero sin tipo definido)
que es el requerido por las funciones read y write.
        Y el que pregunta con correcci�n nunca molesta :-).

Un saludo.
- -- 
Jes�s Carrete Monta�a (Kuantiko) <kuantiko@escomposlinux.org>
LRU #158442 -> I use free software. | PGP Key -> pgp.rediris.es
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Processed by Mailcrypt and GnuPG

iD8DBQE69jqufUtQQKOnZ1IRAoiaAKCyV1NU9DqSossAxxwQFJa3bUm51QCg2sKG
BTC3G15TVZ8iwMO7O/bm6tk=
=ru1i
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <878zk9wv9r.fsf@relativistic.homeip.net>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!212-coru-x9.libre.retevision.ES!not-for-mail
References: <3AF3F290.1030009@wanadoo.es> <874ruzsvb6.fsf@relativistic.homeip.net> <UlhJ6.21217$nG5.373122@telenews.teleline.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,5fd35ee70e813e32
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-05-07 09:05:38 PST
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!212-coru-x9.libre.retevision.ES!not-for-mail
From: kuantiko@escomposlinux.org (Jesús Carrete
  Montaña)
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Estructuras por socket
Date: 07 May 2001 08:03:28 +0200
Lines: 32
Sender: kuantiko@relativistic.homeip.net
Message-ID: <878zk9wv9r.fsf@relativistic.homeip.net>
References: <3AF3F290.1030009@wanadoo.es> <874ruzsvb6.fsf@relativistic.homeip.net> <UlhJ6.21217$nG5.373122@telenews.teleline.es>
NNTP-Posting-Host: 212-coru-x9.libre.retevision.es (62.83.52.212)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 989251536 17570484 62.83.52.212 (16 [54696])
X-Orig-Path: relativistic.homeip.net!nobody
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7