Regular expressions, C++ kai linux

Nikos Mavroyanopoulos nmav at gnutls.org
Tue Jun 25 12:49:03 EEST 2002


On Tue, Jun 25, 2002 at 11:45:25AM +0300, Dimitris Stasinopoulos wrote:

> > Eimai 10000000% sigoyros oti den einai ayto to problima. Oso den kaneis
> > free() oti exeis dimioyrgisei me new kai den kaneis delete(), oti exeis
> > desmeysei me malloc(), tote den exeis problima. Steile an mporeis to prog
> > soy, h enan sample kodika poy coriazei gia na to 'diorthosoyme'. Prosopika
> > exo xrisimopoihsei regexps se C++ kodika, o opoios exei kratisei uptime
> > pano apo mina, xoris kanena apolytos problima.
> Gelio: Bazo ena char[32] prin tin dilosi "regex_t preg;" kai allo ena meta. 
> Apotelesma 1): Den crasharei pleon.

Είναι τυχαίο. Αν σε άλλο μηχάνημα έχεις άλλη κατανομή μνήμης θα
σπάσει εκεί. Επειδή μόνο εικασίες μπορούμε να κάνουμε το καλύτερο που
μπορεις να κάνεις είναι να στείλεις το μικρότερο κομμάτι εκείνο του κώδικα που 
έχει το πρόβλημα.

> > p.s. To kaneis compile me g++ h gcc ? (moy'xe tyxei kapote tetoio prob)
> g++. Sample compile line:
> g++ -DHAVE_CONFIG_H -I. -I. -I.. -O2 -fno-exceptions -fno-check-new -c -o 
> helpfunc.o `test -f helpfunc.cpp || echo './'`helpfunc.cpp
Ξέχασες το -Wall. Ειδικά στο development χρειάζονται οι -g (ή -ggdb3)
και η -O0, αλλιώς το debugging είναι εφιάλτης.

> 
> -- 
> Dimitris Stasinopoulos
> 
> I am but a small signature
> At the down down of the writing
> If you don't read me
> It will become the come and see.
> 
> -- 
> linux-greek-users mailing list -- http://lists.hellug.gr
> 

-- 
Nikos Mavroyanopoulos
mailto:nmav at gnutls.org



More information about the Linux-greek-users mailing list