Read specific column in a line of text file

Hi everyone,
I have text file like this:
516457 +9989704016796.0 1
516471 +9989844018787.0 1
516481 +9989984013367.0 1
516484 +9990124023453.0 1
76516 +9990264014313.0 2
76522 +9990404025578.0 2
76541 +9990544016397.0 2
76561 +9990684018087.0 2
77081 +9990824015982.0 2

I want to read each column separately, below is my code:
#include <iostream>
#include <fstream>
#include <string>
#include <stdint.h>
#include <sstream>
#include <typeinfo>
using namespace std;

int main()
{

int pos,pos2,pos3;
ifstream inf;

inf.open ("123.txt");
if (inf.is_open())
{

while (getline(inf,line))
{

if (line.find("Pkt_recv") != string::npos)
{
pos=line.find(word1);
pos3=line.find(word3);
line.replace(pos,word1.length(),"");
line.replace(pos3,word3.length(),"");
//inf >> a >> b >> c;
//cout << a << b << c << endl;

istringstream iss (line);
uint64_t column1;
uint32_t column3;
uint64_t column2;
iss >> column1 >> column2 >> column3;
cout << column1 <<" "<< column2 <<" "<< column3 << endl;

}

}
inf.close();
}
else cout << "Unable to open file inf \n";


return 0;
}
I could to get the values of column 1 and 2 and save in variables column1 and column2 but I could not get the third column value of text file. I do not know what is the problem. anyone can help me please. below is the output of mentioned code:

516688 9994744028138 0
516695 9994884028607 0
516709 9995024025201 0
516715 9995164029193 0
516735 9995304025456 0
516761 9995444028980 0
516767 9995584027224 0
516779 9995724028576 0

As you see the third column that I got is zeros, the values of third column should be either 1 or 2 or 3 or 4.
Regards
Reading into an integer will stop at the decimal point. You will need to add additional code to either ignore any additional text up to the next space, read into a type like a double, or something similar.
Thanks for your reply
Yep, I changed the type into double_t and it is working now.
Topic archived. No new replies allowed.