Re: Trouble with non-default constructors
From: Francis Glassborow (francis_at_robinton.demon.co.uk)
Date: 07/10/04
- Previous message: Peter Venis: "Trouble with non-default constructors"
- In reply to: Peter Venis: "Trouble with non-default constructors"
- Next in thread: Chad J McQuinn: "Re: Trouble with non-default constructors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 10 Jul 2004 18:48:02 +0100
In article <6d317$40eff9c2$3ea61746$1242@news2.zonnet.nl>, Peter Venis
<petervenis@zonnet.nl> writes
>Hi,
>
>I have a class that needs a non-default constructor, the class is supposed
>to look like this:
>
>class MyClass
>{
>protected:
> int Value;
>public:
> MyClass(int V);
> ~MyClass();
> void GetValue(){return Value);
>};
>
>But if I try to compile my compilers complains there's no default
>constructor, but I don't want a default constructor (???)
I think you are looking in the wrong place for the problem. Unless you
have an impossibly broken compiler it will be something in the code that
is trying to use MyClass that is causing the error.
-- Francis Glassborow ACCU Author of 'You Can Do It!' see http://www.spellen.org/youcandoit For project ideas and contributions: http://www.spellen.org/youcandoit/projects
- Previous message: Peter Venis: "Trouble with non-default constructors"
- In reply to: Peter Venis: "Trouble with non-default constructors"
- Next in thread: Chad J McQuinn: "Re: Trouble with non-default constructors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|