Thread: Attributes for C++ data types?

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    33

    Thumbs down Attributes for C++ data types?

    Hey all;

    Are there any Attributes for C++ types?
    I know in Ada you can use the 'ticker' and call/define them.

    Its probably a stupid question, as the only solution I can come up with is to dis-allow anything outside of the limits of the type within the code itself.

    Am I waffling?

  2. #2
    Registered User
    Join Date
    Aug 2008
    Posts
    33
    ... Guess I must have answered my own question then...

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Geez, be a little more patient. This isn't a pizza delivery service.
    Yes, there are certain attributes like const, mutable or volatile. However, none do what you want it to do.
    Yes, there are ways around it in C++ using some template programming. If you understand it well enough, then yes, I can provide my own implementation of a ranged integer.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Even pizza delivery services take longer than 8 minutes (in most places).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extending basic data types.
    By nempo in forum C++ Programming
    Replies: 23
    Last Post: 09-25-2007, 03:28 PM
  2. Replies: 4
    Last Post: 06-14-2005, 05:45 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 06:51 PM
  5. Using enumerated data types
    By SXO in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2001, 06:26 PM