cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Declared objects for a class
Declared objects for a class
Oct 12, 2010 at 3:06pm UTC
majidkamali1370
(241)
Hi.
I create a class that represents huge numbers or very small ones.
How can i create a constant object that represents something special.
For example I want to create EPSILON object of my class.
How can I do that?
Thanks :-)
Oct 12, 2010 at 3:38pm UTC
Bazzy
(6281)
const
YourClassName YourObjectName ( constructor, arguments );
Oct 12, 2010 at 4:52pm UTC
majidkamali1370
(241)
Excuse me.
I don't understand what you mean.
My class has a constructor without parameters.
Oct 12, 2010 at 9:08pm UTC
Bazzy
(6281)
Whatever, it was an example
If you can create a non-constant object ( ie: a variable ) you can create a const object
Topic archived. No new replies allowed.