#include <iostream>
using namespace std;
double prompt(string input)
{
double input;
cin>>input;
return input;
}
int main()
{
double answer;
double euro = prompt("Enter the value in Euros : ");
answer=euro/1.583;
cout<<answer;
system ("Pause");
return 0;
}
我想打印「以歐元輸入值:」但它不會。 和我得到一個錯誤 - '返回':無法從'std :: string'轉換爲'double'如何打印一個字符串,在C++中作爲參數提供
嘗試#包括 –
danca