🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6862

value of class object

#6862
From: Boguslaw Fries
Date: Fri, 08 Apr 2005 10:48
25 lines
1505 bytes
Hello,
I posted this question here because I dont know exactly which is the 
appropriate newsgroup for it. Sorry ;)

I declare the class:
class Myclass
{
private:
    int iVal;
    float  fVal;
public:
    Myclass( int i ) { iVal = i;}
    Myclass( float f ) { fVal = f; }
}
Now in my program:
Myclass M( 5 );
int X;

X = M; // X should obtain value 5

How to implement extra things to do it? In fact I could use Variant class, 
but intentionally I do not.
Best regards

Boguslaw Fries 
Technical Details
Message-ID: <42566160$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!zen.net.uk!dedekind.zen.co.uk!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1f4e1214f81b2544,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Boguslaw Fries" <boguslaw.fries@polivision.it>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: value of class object
Date: Fri, 8 Apr 2005 12:48:04 +0200
Lines: 27
Organization: PoliVision
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 82.89.172.102
Message-ID: <42566160$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1112957280 82.89.172.102 (8 Apr 2005 03:48:00 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!zen.net.uk!dedekind.zen.co.uk!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail