C++ me g++
The Reverant
reverant at freemail.gr
Thu May 3 19:17:01 EEST 2001
When the time was Thursday 03 May 2001 17:29, Konstantinos Pistiolis wrote:
> Opa, ayto poy 8es den ginetai akribws etsi... Allo
> deikths se mia synarthsh poy den pairnei tipote kai
> epistrefei int, dhladh "int (*)()" kai allo deikths se
> mia synarthsh antikeimenoy 'AClass' poy dinei int.
> dhladh "int (AClass::*)()"
> En oligois, oi synarthseis poy einai melh klassewn,
> de diaferoyn KA8OLOY APO TIS ALLES gia ayto yparxei
> MONO MIA SYNARTHSH gia ola ta antikeimena. Ara otan
> kaleis mia tetoia synarthsh ayth den kserei se poio
> antikeimeno kaleitai kai prepei epipleon na dwseis kai
> to deikth sto antikeimeno ektos toy deikth sth
> synarthsh.....
> 8a eprepe dhladh na peis
> int (AClass::*pFunc)()=myClass.aFunc;
> anti gia
> int (*pFunc)()=myClass.aFunc;
> poy orizei ton pFunc sa deikth se tetoia synarthsh
> poy einai mellos se tetoioy typoy antikeimeno...
>
> mono etsi o deikths pFunc einai pliris, alla prepei
> parallhla NA DINEIS KAI TO ANTIKEIMENO, dhladh edw h
> klhsh 8a ginei me ena deikth kai ena antikeimeno:
> (myClass.*pFunc)();
> me th boh8eia toy telesth .*
> Antistoixa yparxei kai o telesths ->*
To problima einai kapos pio sintheto...to programmataki pou edosa pio pano
einai ena cut down enos programmatos peripou 2k grammon, kai den skeftika oti
tha iparxoun kai alles sinepeies. Etsi to basiko problima einai oti o diktis
pFunc prepei na perasei os parametros stin gnosti mas signal, etsi oste otan
px. to programma lambanei SIGINT, na ekteleitai i void AClass::pFunc(int
anInt), tou antikeimenou myClass. Note oti to myClass einai to monadiko
instance tis AClass pou tha dimiourgeitai mesa sto programma. Poia einai
loipon i sosti sintaksi tis entolis signal()? Prospathisa polla alla panta
ktipaei o g++...
Efxaristo kai pali kai esena Konstantine alla kai ton filo Efstathiou.
--
The Reverant
(Dimitris Stasinopoulos)
"Eimaste Mafiozoi.
Mas xtipate, sas xtipame.
Einai i douleia mas."
More information about the Linux-greek-users
mailing list