Serghei Amelian wrote:
> 
> Exista vre-o posibilitate de a initializa o variabila dintr-o clasa?
> Am ceva de genul:
> 
> class Parsing
> {
>   [..]
> 
> private:
>   const char *keywords[] = { "QT", "KDE", "CUSTOM", "QTDIR" };
>   [...]
> }
> 
> Serghei.

Variabilele le poti initializa in constructor. Exista o varianta mai
speciala pentru cele globale.

La ce ai tu nevoie foloseste:
   static const char *keywords[] = { "QT", "KDE", "CUSTOM", "QTDIR" };

care aloca 1 exemplar pentru toata clasa, nu pentru fiecare obiect
(instanta a clasei).

-- 
 Paul Chitescu
 [EMAIL PROTECTED]  http://pchitescu.myip.org/  ICQ:22641673
 Any spammers will be painfully squeezed into /dev/null
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to 
unsubscribe from this list.

Raspunde prin e-mail lui