Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > compiler warnin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 43841 of 48417
Post > Topic >>

compiler warning

by djshoham@[EMAIL PROTECTED] Mar 12, 2008 at 09:11 AM

Hi the following code gives me the warning    "warning: passing
'double' for argument 1 to 'void B::test(int)"

class A
{
	public:

	void test(int a) {}

	void test(double d) {}
};

class B : public A
{
	public:

	void test(int a)
	{
		double d = 0.0;
		test(d);                   ---> this line cause the warning.
	}
};

But the function "test(double d)" is inherited by B from A. Why can
this function not be resolved.

Thanks.
 




 4 Posts in Topic:
compiler warning
djshoham@[EMAIL PROTECTED  2008-03-12 09:11:35 
Re: compiler warning
Jeff Schwab <jeff@[EMA  2008-03-12 09:26:25 
Re: compiler warning
Puppet_Sock <puppet_so  2008-03-12 09:21:28 
Re: compiler warning
djshoham@[EMAIL PROTECTED  2008-03-12 23:12:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 10:09:40 CST 2008.