By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,412 Members | 929 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,412 IT Pros & Developers. It's quick & easy.

a class that does not have a default constructor

P: n/a
what does it mean? Could you please show me an example ?

For a class without a default constructor,how to initialize ?

Oct 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
asdf wrote:
what does it mean? Could you please show me an example ?

For a class without a default constructor,how to initialize ?

class C
{
public: C(int i){}
};

C c1; // error
C c2(1234); // Ok

Ben
Oct 2 '06 #2

P: n/a
thanks.
benben wrote:
asdf wrote:
what does it mean? Could you please show me an example ?

For a class without a default constructor,how to initialize ?


class C
{
public: C(int i){}
};

C c1; // error
C c2(1234); // Ok

Ben
Oct 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.