473,320 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

complex object declaration

hi
i am a new bie to c++ and found that function has been declared in place of object.
(ie)
class_name object_name; //normal declaration

class _name object_name( ); //it works but what does it mean plese help


Thanks in advance
Sep 21 '07 #1
5 1890
hi
i am a new bie to c++ and found that function has been declared in place of object.
(ie)
class_name object_name; //normal declaration

class _name object_name( ); //it works but what does it mean plese help


Thanks in advance
class _name object_name( );

The above declarations is used to call the class "Constructer" while declaring the object. Get familiar with the concept of constructors to understand better..
Sep 21 '07 #2
thanks for u r reply . i know about constructors and the object_name() was not the same name as a classname and i am sure that it was not a constructor.
Sep 21 '07 #3
weaknessforcats
9,208 Expert Mod 8TB
This is defining a class_name object called object_name:
class_name object_name; //normal declaration
This is a function prototype of a function named object_name that takes no arguments ans returns a class_name object:
class _name object_name( ); //it works but what does it mean plese help
Sep 21 '07 #4
thanks

ie. a function returning the object of type class_name. right.
Dec 19 '07 #5
weaknessforcats
9,208 Expert Mod 8TB
Yes. That's correct.
Dec 19 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Peter Olsen | last post by:
I want to define a class "point" as a subclass of complex. When I create an instance sample = point(<arglist>) I want "sample" to "be" a complex number, but with its real and imaginary...
34
by: Pmb | last post by:
I've been working on creating a Complex class for my own learning purpose (learn through doing etc.). I'm once again puzzled about something. I can't figure out how to overload the assignment...
0
by: masood.iqbal | last post by:
I have always had trouble correctly interpreting complex type declarations without using the "declarator parser" program given in K&R. Then someone taught me about the "Clockwise" Rule. Start with...
5
by: Trail Monster | last post by:
Ok, I've been searching the net now for several days and can't find how to do this anywhere. Version: VS 2005 Professional Release, 2.0 Framework Background: I have a complex business object...
2
by: Lance | last post by:
I want to be able to reset a complex property in a PropertyGrid. I know that for properties that are ValueTypes you can include System.ComponentModel.DefaultValue in the declaration of the property....
1
by: louis_la_brocante | last post by:
Dear all, I am having trouble generating a client proxy for a webservice whose methods return a "complex" type. The type is complex in that it is a class whose members are a mix of primitive...
7
by: silversurfer2025 | last post by:
Hello, I would like to overload the operators *, + and = in a class, which is used much like a vector (such as in linear algebra). For this, I need to be able to add featureVectors to each other,...
3
by: andreas.baus | last post by:
Hello. I'm trying to exchange data between a webservice based on Apache Axis and a client written in C#, and so far it has been working with few problems (none that I couldn't solve myself with...
1
by: perroe | last post by:
Hi I have a array of complex numbers that are stored in a simple double array. This is done since the array is part of an wrapper for an external C library, and the imaginary part of the first...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.