/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int stonetolb(int);
int main() {
int stone;
cout<<"Enter the weight in stone: ";
cin >> stone;
int pound =stonetolb(stone);
cout <<stone<<" stone are ";
cout<<pound<<" pounds.\n";
return 0;
}
int stonetolb(int sts)
{
return 14*sts;
}
可是編譯器跑出一堆的錯誤,錯誤截圖為:
[attach]123189127[/attach]
10個錯誤的訊息都類似下面這個........
[Error] 'cout' was not declared in this scope
[Note] suggested alternative:
in file included form 2018042888.cpp
[Note] 'std::cout'
[Error] 'cin' was not declared in this scope