Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters
Register

Reply
 
LinkBack Thread Tools
Old 21.09.2002, 10:29   #1
В бой аргхххххххх!
 
hov's Avatar
 
Join Date: 09 2002
Location: Vik, Medieval Norway
Age: 35
Posts: 1,513
Downloads: 12
Uploads: 0
Reputation: 43 | 3
Post static variables in class member functions

Example code

Code:
  
class aaa
{
public:
   f()
   {
       static int tiv=5;
   }
};
Asem vor ashxatacneluc heto parzvec vor bolor objectneri hamar pahvuma tiv-i mi hat kopia. Orinak ete mi objekti mejic tiv++; anes heto mi urish objecti mejic cout << tiv; kstanas mekov metsatsrats arjeq. Aisinq voncvor sovorakan class-i andam static popoxakany.
Hetaqrqir klini mi qich manramasn bacatrutiunner lsel.

Hov.
__________________
Rock Hovhannes.

Дневник
Stryfe.Am - Coming Soon!
Reply With Quote
Old 21.09.2002, 16:35   #2
Академик
 
greka's Avatar
 
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Downloads: 0
Uploads: 0
Reputation: 18 | 5
Post

>parzvec vor bolor objectneri hamar
najc inchi "parzvec" ?

))
Reply With Quote
Old 21.09.2002, 22:24   #3
Младенец
 
Join Date: 07 2002
Location: Подполье
Posts: 23
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Arrow

hov inchqanov gitem et dzevov haytararac popoxakani hascen kompilyacyai jamanak arden texadruma kompilyator@...dra hetevanqov ete klasi mi obekti et popoxakani arjeq@ poxvuma et hasceov gtvox qo depqum 4 baytum et tivna grvum, urish andamneric et klasi inchqan dimes tiv popoxakanin nyn hasceica vercnelu...
Reply With Quote
Old 22.09.2002, 01:41   #4
В бой аргхххххххх!
 
hov's Avatar
 
Join Date: 09 2002
Location: Vik, Medieval Norway
Age: 35
Posts: 1,513
Downloads: 12
Uploads: 0
Reputation: 43 | 3
Post

To >>> Greco El
chishtn asats harct kam patasxant chhaskaca....
Es stegh lriv kody chei grel haves chkar ( chnaiats arden mi etqan es topicum greci ..) mi erku hat funkcia ei shinel kardal/grelu hamar..

To >>> Фармозон
Thanks...
Aisinqn voch mi banov chi tarbervum sovorakan static memberic ?
Reply With Quote
Old 22.09.2002, 13:44   #5
Академик
 
W_z_rd's Avatar
 
Join Date: 08 2002
Location: Yerevan, Armenia
Age: 45
Posts: 4,854
Downloads: 1
Uploads: 0
Reputation: 225 | 3
Post

hov jan, es harcit portzem patasxanel, baytz te da en harceritsa, vor aveli lav e C++ girq vercnes kardas.

Peremennie obyavlennie static pomeshayutsya v global`nuyu oblast` dannix programmi, tuda zhe, kuda pomeshayutsya vse global`no ob'yavlennie peremennie. V etom smisle nevazhno gde ti obyavish peremennuyu - v samoy funkcii, ili kak static member klassa. Raznica tol`ko v 'dostupnosti' peremennoy: static member klassa dostupen iz vsex funkciy klassa, a static peremennaya funkcii 'vidima' tol`ko v toy samoy funkcii, v kotoroy ona ob'yavlena (chto, vprochem, spravedlivo ne tol`ko dlya 'static' lokal`nix peremenix).
__________________
Женщин не надо понимать, их надо любить!
Reply With Quote
Old 23.09.2002, 15:46   #6
Академик
 
greka's Avatar
 
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Downloads: 0
Uploads: 0
Reputation: 18 | 5
Post

2 hov: static popoxakannery mtacvac ein henc ajn npatakov, vor nrranq linen STATIC, ankax amen inchic.

dranq inch-vor imastov GLOBAL popoxakanner en.


isk du harcnum es "inchi a tenc" ...
Reply With Quote
Old 23.09.2002, 20:18   #7
В бой аргхххххххх!
 
hov's Avatar
 
Join Date: 09 2002
Location: Vik, Medieval Norway
Age: 35
Posts: 1,513
Downloads: 12
Uploads: 0
Reputation: 43 | 3
Post

To W_z_rd > Ha arden skseci patkeracnel inch eq uzum asel.
To Greco El > Asem. Ughaki es chei mtatsum vor amentegh grats staticy nuin imasty uni.

Thanks, Hov.
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 15:47.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.