473,320 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

explict keyword for constructors with no arguements ?

Hi all,

I have seen few places where constructors are declared like this.

class A {
explicit A(){};
};

I can understand this,
class A {
explict A(int i){};
};

Can some one explain the need for explict in case 1 ?

Thanks
Ganesh
Jul 22 '05 #1
2 1381
Ganesh Gella wrote:
Hi all,

I have seen few places where constructors are declared like this.

class A {
explicit A(){};
};

I can understand this,
class A {
explict A(int i){};
};

Can some one explain the need for explict in case 1 ?

Thanks
Ganesh


Short answer: None.

Long Answer:
I remember reading a thread about this very recently.
Search the google archives for one, may be within the last month.

--
Karthik. http://akktech.blogspot.com .
' Remove _nospamplz from my email to mail me. '
Jul 22 '05 #2
> Long Answer:
I remember reading a thread about this very recently.
Search the google archives for one, may be within the last month.


That thread was /of course/ started by the very same person as this thread.
I guess he didn't believe the answers he got that time so he's going to be
disappointed to get exactly the same answer this time.

john
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Edward Diener | last post by:
In the tutorial on functions there are sections on default arguments and keyword arguments, yet I don't see the syntactic difference between them. For default arguments the tutorial shows: def...
4
by: Ganesh Gella | last post by:
Hi All, While going through xalan's XSLT source code, I came across few constructors which are qualified as "explicit". These constructors are empty constructors. I read about the use of...
1
by: Ganesh Gella | last post by:
Hi all, I have seen few places where constructors are declared like this. class A { explicit A(){}; }; I can understand this, class A {
59
by: seberino | last post by:
I've heard 2 people complain that word 'global' is confusing. Perhaps 'modulescope' or 'module' would be better? Am I the first peope to have thought of this and suggested it? Is this a...
8
by: Dawn Minnis | last post by:
Hey guys If I have a program (see codeSnippet1) that I compile to be called test.o Then run it as test.o n n 2 3 4 I want the code to be able to strip out the two characters at the start...
3
by: Ben Galvin | last post by:
Hi, I'm looking for an equivalent to the C++ 'friend' keyword in C# (for those who don't know, this lets you give a specific class access to all the private/protected members of another class)....
5
by: Water Cooler v2 | last post by:
Does the *this* keyword refer to the class or the instance?
8
ilikepython
by: ilikepython | last post by:
Hi I have a question about classes. If you have a class and its constructor takes arguements. Is there a way you can create an array that stores objects from that class but each one of them getting...
2
by: Nike | last post by:
I have a small question w.r.t usage of default arguements in template.. I shall try to elaborate this with an example.. let's say I have some template function , where EntryType is the input for...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.