473,386 Members | 1,733 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,386 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 1386
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.