我刚开始编程,我不知道我在做什么。我的教授给了我们要做的程序集,我已经完成了,但是当我编译文件时,我得到了
" J:\Untitled1.cpp 在函数 `int main()' 中:
“36 J:\Untitled1.cpp '<<' 标记之前的预期主表达式”
这是全套,现在记住我是初学者:
/** CONCEPTS PROGRAM #1, TEMPLATE
PROGRAM Name: Yay.cpp
Program/assignment:
Description: Finds total
Input(s):
Output(s):
suffering_with_c++
Date of completion
*/
//included libraries
#include <iostream>
#include <iomanip>
#include <stdlib.h>
#include <time.h.>
#define cls system("cls")
#define pauseOutput system("pause")//
using namespace std;
int main()
{
//variable declaration/initialization
time_t nowIsTheMoment;
time(&nowIsTheMoment);
string dateTime;//
cls;
cout <<"\new live in the moment--only this moment is ours. The Current Date and time is: "
<<ctime (&nowIsTheMoment); << endl;//
cout << "\nMy name is Moe Joe." <<endl;//
cout << endl << "I think Computer Programming with C++ will be a bit more PHUN now!"
<< endl;
dateTime = ctime(&nowIsTheMoment);//
cout << endl << "\nYo ho! I am here now...\n" << endl;
cout << endl << "The Current Date and time is: "
<<dateTime <<endl;//
cout << "\nI know clearly that, if I DO NOT comment my programs/project work thorougly, I will lose substantial points.\n" ;
cout << "\bHere is Pause Output in action....\n" << endl;//
pauseOutput; //
cls;//
return 0;
}