Sign in to follow this  
Drakkcon

What's up with these keywords?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this