Jump to content
  • Advertisement
Sign in to follow this  
Drakkcon

What's up with these keywords?

This topic is 4994 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was looking through C++ keywords in MSDN's reference and found some pretty cool keywords that you don't see often. Some are 'abstract', 'sealed', and 'auto'. After looking at what they do, I wonder if there's any use for them at all (especially auto). Do any of you make use of them?

Share this post


Link to post
Share on other sites
Advertisement
Oh, I thought they were normal C++ keywords. Auto works in DevC++ anyway. Are you sure? They were under C++ reference, not .net reference.

Share this post


Link to post
Share on other sites
abstract and sealed are both managed c++ keywords that only work with managed c++, look up .NET for more on that. auto is standard but pretty useless in most cases IMO.

Share this post


Link to post
Share on other sites
abstract and sealed are C# / Managed C++ only

auto, from msdn:

Few programmers use the auto keyword in declarations because all block-scoped objects not explicitly declared with another storage class are implicitly automatic. Therefore, the following two declarations are equivalent:

void main(){
auto int i = 0; // Explicitly declared as auto.
int j = 0; // Implicitly auto.
}

Share this post


Link to post
Share on other sites
Quote:
Original post by cavemanbob
auto is standard but pretty useless in most cases IMO.
Useless in all cases, at least until C++0x (maybe)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!