> Second one:
> 
> #include <iostream>
> using std::cout;
> using std::endl;
> 
> class da{
> public:
>   void printargu( int a = 0 );
> };
> 
> void da::printargu( int a = 0 ){
>   cout << a << endl;
> }
> 
> int main(){
>   da.printargu();
> }
> 
 
sorry, in main() should be:
da daa;
daa.printargu();

but the errors of line 10 and line 7 are still
there.

> I can compile the first one and get the right
> result. 
> However, for the second one, there are errors:
> c.cpp:10: error: default argument given for
> parameter
> 1 of 'void da::printargu(int)'
> c.cpp:7: error: after previous specification in
> 'void
> da::printargu(int)'



        

        
                
___________________________________________________________ 
雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱 
http://cn.mail.yahoo.com



_______________________________________________
Help-gplusplus mailing list
Help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to