How to read a text file in C
void lecture()
{
ifstream myFlux("C:/test.txt");
if(myFlow)
{
string line;
while(getline(myFlow,line))
{
int position=myFlow.tellg();
cost< < "position in the "< file < position< < endl;
cost< < line< < endl;
}
getline;
}
else
{
cost< < "Unable to open file" < < endl;
}
}