What's up with these keywords?
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?
Oh, I thought they were normal C++ keywords. Auto works in DevC++ anyway. Are you sure? They were under C++ reference, not .net reference.
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.
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.
}
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.
}
Quote:Original post by cavemanbobUseless in all cases, at least until C++0x (maybe)
auto is standard but pretty useless in most cases IMO.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement