i wanna ask..what is the equivalent syntax for contructors in c++?

Recommended Answers

All 4 Replies

Well i assume u want the basic layout. The Fact is a simple google search will show you that so easily why you would need a forum discussion is beyond me its just lazyness.

But im a nice guy so here it is

class x
{
  x(){;}//ctor
  ~x(){;}//dtor
}

ah, i know it.constructors and destructors..my problem before was to convert java codes into a C++ code..but i had done it..tnx anyway..
my purpose of posting this thread is just to have an idea for my very fisrt step and definitely, after posting this thread i am already working.
but still tnx for the VERY NICE concern from a nice guy

like java, you can have any number of constructors overloaded :)

Please use real words. 'plssss' and 'tnx' are not words! It helps to keep the community looking professional.

commented: Agreed! +13
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.