主题:请各位大虾指教下,怎么总是有错误,但是我发现不了 谢谢
#include "stdafx.h"
#include<iostream>
inline int Double (int targer);
int main()
{
int targar;
using std::cout;
using std::cin;
using std::endl;
cout<<"Enter a number to work with:";
cin>>targer;
cout<<endl;
targer=Double(targer);
cout<<"Targer:"<<targer<<endl;
targer=Double(targer);
cout<<"Targer:"<<targer<<endl;
targer=Double(targer);
cout<<"Targer:"<<targer<<endl;
return 0;
}
int Double(int targer)
{
return 2*targer;
}
#include<iostream>
inline int Double (int targer);
int main()
{
int targar;
using std::cout;
using std::cin;
using std::endl;
cout<<"Enter a number to work with:";
cin>>targer;
cout<<endl;
targer=Double(targer);
cout<<"Targer:"<<targer<<endl;
targer=Double(targer);
cout<<"Targer:"<<targer<<endl;
targer=Double(targer);
cout<<"Targer:"<<targer<<endl;
return 0;
}
int Double(int targer)
{
return 2*targer;
}