Re: overloading in C

From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 11/25/04


Date: Thu, 25 Nov 2004 02:58:24 GMT


"uday" <kariudaykiran@yahoo.co.in> wrote...
> Does C supports overloading. I am thinking no. But some people are
> saying yes. If yes how. Please answer with examples.

C does not. And why are you asking about C in a C++ newsgroup?

> Also in c++ size of empty class is one. why.

To make sure that an array of such empty class objects would have
elements sitting at distinct addresses.

> and what are the
> default methods created in a class.

A default constructor, a destructor, a copy constructor, a copy assignment
operator. Each of them except the destructor are created conditionally.

> These questions are asked in
> interviews. so please explain.

Please read a C++ book for explanations.

V



Relevant Pages

  • Re: cant establish connection to Domino Server
    ... In Constructor of CABProvider ... WINAPI OpenServiceProfileSection ... In Destructor of CNotesExchExt ... AllocateAndCopyString ...
    (microsoft.public.outlook.interop)
  • Re: Any experience with "The Last One"?
    ... In this International Standard, the examples, the notes, the ... xconstructor ... xdestructor ...
    (comp.lang.c)
  • Re: Any experience with "The Last One"?
    ... In this International Standard, the examples, the notes, the ... xconstructor ... xdestructor ...
    (comp.programming)
  • Re: Best way to deal with long loops?
    ... var ts:TCallbackTimer; ... destructor TCallbackTimer.destroy; ... constructor TRunningAverage.Create; ... // and currenttick will be wrapped, ...
    (alt.comp.lang.borland-delphi)
  • Re: problem with destructor
    ... When I deleted all methods except constructor and destructor I still have ... > private copy constructor and a private assignment operator. ... Remember that it could be anywhere, just because the code crashes ...
    (comp.lang.cpp)