Plz help me with this code the errors in the Dev 4 compiler was:
parse error befor (
parse error befor else
The whol code:
#include <stdlib.h>
#include <iostream>
#include <string>
#include <fstream>
#include <windows.h>
using namespace std;
int main()
{
start:
ifstream fin;
string szLine = "";
fin.open("Stats.txt");
if(fin.fail())
{
goto start;
}
fin.seekg(NULL, ios::beg);
while getline(szLine) //Error Here
if(szLine = "helo");
{
cout << "" << endl;
Sleep(1000);
return 0;
}
else //Error Here
{
goto start;
}
fin.clear();
fin.close();
return 0;
}
parse error befor (
parse error befor else
The whol code:
#include <stdlib.h>
#include <iostream>
#include <string>
#include <fstream>
#include <windows.h>
using namespace std;
int main()
{
start:
ifstream fin;
string szLine = "";
fin.open("Stats.txt");
if(fin.fail())
{
goto start;
}
fin.seekg(NULL, ios::beg);
while getline(szLine) //Error Here
if(szLine = "helo");
{
cout << "" << endl;
Sleep(1000);
return 0;
}
else //Error Here
{
goto start;
}
fin.clear();
fin.close();
return 0;
}