#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream a;
a.open("c.txt"); //file contains "afe 21 3 df"
string b;
while (a>>b)
{
if (atoi(b)>0) cout<<b;
}
}
error是cannot convert string to constant *char, 同时,我这样check是否是整数是正确的吗