Click here to Skip to main content
15,905,238 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRE: OnDraw, how can I get the rectangle that is painting ? Pin
Anonymous24-Nov-99 14:56
suss Anonymous24-Nov-99 14:56 
GeneralTrying to print with a CWinThread... Pin
Braulio Diez23-Nov-99 1:18
sussBraulio Diez23-Nov-99 1:18 
GeneralCHtmlView Pin
Thierry Mathieu22-Nov-99 20:50
sussThierry Mathieu22-Nov-99 20:50 
GeneralBasic OOP question... Pin
Braulio Diez22-Nov-99 20:32
sussBraulio Diez22-Nov-99 20:32 
GeneralRE: Basic OOP question... Pin
Paul Selormey22-Nov-99 20:55
Paul Selormey22-Nov-99 20:55 
GeneralThanks but... Pin
Braulio Diez22-Nov-99 21:20
sussBraulio Diez22-Nov-99 21:20 
GeneralRE: Thanks but... Pin
Henk Devos23-Nov-99 9:27
Henk Devos23-Nov-99 9:27 
GeneralRE: Basic OOP question... Pin
sandrine22-Nov-99 22:07
sandrine22-Nov-99 22:07 
==================
The original message was:

Hi,

I have a basic OOP question, I have a class ( a base class, and don't inherits from CObject), and I want to have a constructor with some parameters, I make this, but when I want to compile it without errors I have to add an empty constructor without parameters. Why must I do this ? Have I made something wrong ?

Thanks, Bye !
Braulio

Hi Braulio!

example:
Class A
{
public:
A(int x, int y)
{...}

...
}

int main()
{
A p(1,2); // Call the constructor defined
A p; // incorrect! the default constructor doesn't exist. You have to declare it.
...
}

If you defined your own constructor, you have to respect the list of arguments. Not if you add the default constructor (without argument).

Is your case?

Tchao

Sandrine
GeneralRE: RE: Basic OOP question... Pin
Braulio Diez23-Nov-99 1:57
sussBraulio Diez23-Nov-99 1:57 
GeneralRE: RE: RE: Basic OOP question... Pin
Anonymous23-Nov-99 7:41
suss Anonymous23-Nov-99 7:41 
GeneralRe: Basic OOP question... Pin
Member 147421-Apr-00 11:01
Member 147421-Apr-00 11:01 
GeneralDebugging Control Panel Applets Pin
Farzad Bakhtiar9-Apr-00 21:56
sussFarzad Bakhtiar9-Apr-00 21:56 
GeneralGetFieldValue() throws an exception Pin
Stefan20-Nov-99 5:25
Stefan20-Nov-99 5:25 
GeneralRE: GetFieldValue() throws an exception Pin
Member 40424-Nov-99 9:38
Member 40424-Nov-99 9:38 
GeneralRe: a step by step running Pin
goldmount19-Nov-04 3:25
goldmount19-Nov-04 3:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.