🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.c++
Article #147

Re: Función para Aleatorios.

#147
From: R.G.A.M.
Date: Mon, 08 Oct 2007 00:49
14 lines
1859 bytes
On 7 oct, 18:12, Carleto <direccion_fa...@gmail.com> wrote:
> >     srand((unsigned)time(NULL));
>
> El problema me parece que es ésta línea, que como está en la función,
> cada vez que llamas a la función (valga la rebuznancia :) ) reinicias
> los números aleatorios, por lo que siempre te sale el mismo. Esa línea
> la pondría yo al principio de la función main, para que se ejecute una
> sola vez.
>
> Saludos

¡Gracias! ¡Es una solución perfecta! ¡Los resultados fueron inmediatos!
Technical Details
Message-ID: <1191804571.003736.197620@v3g2000hsg.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!v3g2000hsg.googlegroups.com!not-for-mail
References: <1191791399.660205.170130@o80g2000hse.googlegroups.com> <feblkh$t1u$1@news-3.escomposlinux.org>

Show Full Headers
Complete Article Headers
X-Google-Thread: f53ec,cfee6b0bbd09c49
X-Google-Attributes: gidf53ec,public,usenet
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!v3g2000hsg.googlegroups.com!not-for-mail
From:  "R.G.A.M." <rgam1989@gmail.com>
Newsgroups: es.comp.lenguajes.c++
Subject: Re: Función para Aleatorios.
Date: Mon, 08 Oct 2007 00:49:31 -0000
Organization: http://groups.google.com
Lines: 15
Message-ID: <1191804571.003736.197620@v3g2000hsg.googlegroups.com>
References: <1191791399.660205.170130@o80g2000hse.googlegroups.com>
   <feblkh$t1u$1@news-3.escomposlinux.org>
NNTP-Posting-Host: 190.52.148.127
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1191804571 17415 127.0.0.1 (8 Oct 2007 00:49:31 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 8 Oct 2007 00:49:31 +0000 (UTC)
In-Reply-To: <feblkh$t1u$1@news-3.escomposlinux.org>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.6;MEGAUPLOAD 1.0,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: v3g2000hsg.googlegroups.com; posting-host=190.52.148.127;
   posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0