🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Problemas con punteros

#557
From: arrase
Date: Thu, 08 Feb 2007 23:41
27 lines
1990 bytes
Claudio escribi�:
> On 2007-02-04, arrase <arrase@gulcas.org> wrote:
>> El problema es que no se como reservar correctamente la memoria para que
>> sea un puntero que apunta a un array de tipo char, que basicamente es lo
>> que getopt necesita.
> 
> Pues ser� como todo: malloc(sizeof(char *) * 6);
> 
> Vamos, digo yo...
> 
> Un saludo.
> --claudio--
> 
> 
Casi, te falta un peque�o matiz:

char **pointer2pointer=(char **)malloc(sizeof(char *) * 6);


-- 
<arrase@gulcas.org><http://arrase.no-ip.org><www.gulcas.org>
     <Gnupg Keys: http://arrase.no-ip.org/pubkey.txt>

print "".join(map(lambda numChar:filter(lambda x:(x<"0") or \
(x>"9"),numChar),["0"+chr(104)+"0","1"+chr(111)+"1","2"+chr(108)+"2", \
"3"+chr(97)+"3","4"+chr(32)+"4","5"+chr(109)+"5","6"+chr(117)+"6", \
"7"+chr(110)+"7","8"+chr(100)+"8","9"+chr(111)+"9"]))
Technical Details
Message-ID: <eqgc0g$6et$1@hercules.cohp1>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.buerger.net!news.antakira.com!cagarruta.escomposlinux.org!hercules.escomposlinux.org!escomposlinux.org!not-for-mail
References: <eq39a9$g7h$1@hercules.cohp1> <slrnesn8lt.3rl.claudio@example.org>

Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,97b70f2db46c0da6
X-Google-Attributes: gidf86c8,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.buerger.net!news.antakira.com!cagarruta.escomposlinux.org!hercules.escomposlinux.org!escomposlinux.org!not-for-mail
From: arrase <arrase@gulcas.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Problemas con punteros
Date: Fri, 09 Feb 2007 00:41:12 +0100
Organization: escomposlinux.org
Lines: 27
Message-ID: <eqgc0g$6et$1@hercules.cohp1>
References: <eq39a9$g7h$1@hercules.cohp1> <slrnesn8lt.3rl.claudio@example.org>
Reply-To:  arrase@gulcas.org
NNTP-Posting-Host: 168.red-80-38-162.staticip.rima-tde.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: hercules.cohp1 1170977616 6621 80.38.162.168 (8 Feb 2007 23:33:36 GMT)
X-Complaints-To: newsmaster@news-17.escomposlinux.org
NNTP-Posting-Date: Thu, 8 Feb 2007 23:33:36 +0000 (UTC)
User-Agent: Thunderbird 1.5.0.9 (X11/20061224)
In-Reply-To: <slrnesn8lt.3rl.claudio@example.org>
X-Enigmail-Version: 0.94.1.1