Regular expressions, C++ kai linux
V13
v13 at priest.com
Tue Jun 25 00:54:02 EEST 2002
On Monday 24 June 2002 21:39, Dimitris Stasinopoulos wrote:
> Paides xaireto()
>
> Proekipse ena "endiaferon" provlima.
>
> Mesa se kodika C++ prepei na xrisimopoiiso regular expressions. Ara prepei
> na kaleso tin regcomp(). Me to pou to kano omos, amesos pairno SIGSEGV, kai
> afto dioti i regcomp() kanei allocate kapoion xoro gia na kanei compile tin
> regular expression, kai profanos aftos o xoros ginetai allocated me kapoia
> apo tis *alloc() functions tis glibc.
>
> Omos, epeidi o "new" operator tis C++ kai oi *alloc den prepei na paizoun
> pote mesa ston idio kodika, pairno to anaferthen SIGSEGV.
>
> Kai eroto: Ti mporei na ginei epi tou thematos? Na paro ton kodika tis
> regcomp() kai na antikatastiso tis *alloc() me "new", kai na onomaso tin
> nea function cc_regcomp() einai ligo ierosilia, alla an den bro alli lisi
> mallon ekei tha katalikso :-/
>
> Exei kaneis kamia idea?
> Efxaristo ek ton proteron.
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.
<<V13>>
p.s. To kaneis compile me g++ h gcc ? (moy'xe tyxei kapote tetoio prob)
More information about the Linux-greek-users
mailing list