如何在 C 中读取文本文件
void lecture()
{
ifstream myFlux(C:/test.txt”);
if(myFlow)
{
字符串;
while(getline(myFlow,line)) >
{
int position=myFlow.tellg();
成本<<”位置在< 文件中的位置<位置<
成本<<行<
}
getline;
}
else
{
成本<<无法打开文件” <
}
}