Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Is 'int' a class defined in C++ standard library ?

Reply
Thread Tools

Is 'int' a class defined in C++ standard library ?

 
 
Old Wolf
Guest
Posts: n/a
 
      09-28-2004
JKop <(E-Mail Removed)> wrote:
> Ron Natalie posted:
> > "JKop" <(E-Mail Removed)> wrote:

>
> >> You can't inherit from the intrinsic types. If you really want to, you
> >> can write a class that makes a clone of them and then do

> >
> > You can make them pretend to be the builtin types, but they will NEVER
> > act fully like them.

>
> How so? Define all the operators and define a "operator int()". What am I
> missing?


Here's one example:
int_wrapper i;
printf("%d\n", i); // runtime error
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
add pexpect to the standard library, standard "install" mechanism. funkyj Python 5 01-20-2006 08:35 PM
#if (defined(__STDC__) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) Oodini C Programming 1 09-27-2005 07:58 PM
How standard is the standard library? steve.leach Python 1 04-18-2005 04:07 PM
Re: Possible additions to the standard library? (WAS: Aboutstandard library improvement) Daniel Bickett Python 0 02-04-2005 11:22 AM
Re: Possible additions to the standard library? (WAS: Aboutstandard library improvement) Fredrik Lundh Python 0 02-04-2005 07:34 AM



Advertisments