| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
parse error at end of input
Here is the piece of code I am trying to compile. I get the error :
parse error at end of input. What am I doing wrong? //Function that appends information to log file. void WriteToLog(int eventTime, char *IP, char *Port, char *message) { //Open log file ofstream outLogFile ("log.txt", ios::app); if (!outLogFile) { cerr<<"File could not be opened."<<endl; exit(1); } //append information to log file int x = atoi(Port); outLogFile<<eventTime<<" "<<IP<<" "<<x<<" "<<message<<"\n"; outLogFile.close(); } |
|
#2
|
|||
|
|||
|
Hey trini!
See the # on the editing tool bar? That's the CODE tag. When you wrap your code between those tags, it leaves the spaces on, making the code readable...Also, please, try showing somehow the line in which the error seems to apear! Good Luck Anibal. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > parse error at end of input |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|