dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

MS VC++ kompilaators, typeof

 
dev.gamez.lv Forum Index -> Programmēšana
View previous topic :: View next topic  
Author Message
nai



Joined: 20 Dec 2006
Posts: 48

PostPosted: Sat Dec 23, 2006 12:02 pm    Post subject: MS VC++ kompilaators, typeof

Ieksh GNU C ir typeof. Un veel virkne ljoti noderiigu C uzlabojumu(http://tigcc.ticalc.org/doc/gnuexts.html)
Vai ieksh MS C kompilaatora ir kaut kas typeof liidziigs?
Bet RTTI pieprasa MS C++ kompilaatoru.
Back to top
View user's profile
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sat Dec 23, 2006 4:43 pm    Post subject:

Ja lieto RTTI, tad MS VC var lietot typeid. Bez RTTI nekā nevarēs to typeof aizstāt.

Taču, ja tu kompilē nevis tīru C++, bet gan C++/CLR (tb .NET), tad tam arī ir typeof keywords.
Back to top
View user's profile Send e-mail
nai



Joined: 20 Dec 2006
Posts: 48

PostPosted: Sat Dec 23, 2006 5:23 pm    Post subject:

bubu wrote:
Ja lieto RTTI, tad MS VC var lietot typeid. Bez RTTI nekā nevarēs to typeof aizstāt.

Taču, ja tu kompilē nevis tīru C++, bet gan C++/CLR (tb .NET), tad tam arī ir typeof keywords.


Es laikam nepreciizi noformuleeju. Kompileeju es tiiru C kodu, tur taa probleema.
Kad es inkludeeju typeinfo headeri, tad, protams, kompilaators izmet erroru, ka typeinfo/RTTI nepiecieshams C++ kompilaators.

Ieksh C++ veel var iztikt bez typeof, izmantojot templeitus.
Kaa arii typeof un RTTI typeid ir savaa zinjaa savaadaaki, jo typeof neizdod runtime type infu, bet gan compiletime.

...laikam sanaak, ka man jaamaina kompilaators uz GNU C, ja es gribu type infu ieksh C.

A es biju iedomaajies, ka C ir C++ miinus klases. Njer, C ir diezgan mazs un nevariigs, pat izmantojot makrosus un tml trikus. No func/op overloading. Sheesh.
Back to top
View user's profile
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sat Dec 23, 2006 5:38 pm    Post subject:

nai wrote:
A es biju iedomaajies, ka C ir C++ miinus klases.

Uh jā, tu ļoti maldies. C++ ir daudz daudz kas vairāk par C.
Back to top
View user's profile Send e-mail
nai



Joined: 20 Dec 2006
Posts: 48

PostPosted: Sat Dec 23, 2006 6:01 pm    Post subject:

bubu wrote:
nai wrote:
A es biju iedomaajies, ka C ir C++ miinus klases.

Uh jā, tu ļoti maldies. C++ ir daudz daudz kas vairāk par C.

Why the present tense?
Indeed. C ir maza valoda, izmantojot C++ es nezinaaju, kuras no C++ fiichaam ir ieksh C un izraadaas, ka to ir pavisam maz(bet cik aatri kompileejas, prieks skatiities, saliidzinot ar citiem projektiem ieks C++)
Back to top
View user's profile
Display posts from previous:   
dev.gamez.lv Forum Index -> Programmēšana All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group