当我尝试用g ++编译它时,这个程序给了我一个完整的错误屏幕,但我甚至没有开始困难的部分。只需打印说明。这有什么不对?
/* Samuel LaManna
CSC 135 Lisa Frye
Program 2 Functions (Shipping Charges)
Calculate the shipping and total charge
for shipping spools of wire
*/
#include <iostream>
using namespace std;
void instruct(); //Function Declaration for instruction function
int main()
{
instruct(); // Function to print instructions to user
return 0;
}
/********************************************/
// Name: Instruct /
// Description: Print instructions to user /
// Parameters: N/A /
// Reture Value: N/A /
/********************************************/
void instruct()
{
cout << "This program will calculate the shipping information "
<< "for a batch of wire spools. " << endl < endl;
return;
}
答案 0 :(得分:4)
这是一个问题:
<< endl < endl;
应该是:
<< endl << endl;