Hello Kelkut,
That is a start.
At the top you are missing header file "string" very important as everything from line 12 on needs it to work.
Line 4 is best not to use as it
WILL get you in trouble some day. See this for some reading:
https://www.geeksforgeeks.org/using-namespace-std-considered-bad-practice/
I did have a more involved way of reading and dealing with the file, but outw's last two lines is the simplest method. I just do not use it as often as I should, so I do not think about it first.
Something to consider now is that the file has 4 lines of five numbers. Do you just need to read this when needed or would storing what has been read be useful. I played with a 2D vector, but a 2D array will work.
Lines 8 an 10 are good. Although after I put a comment on line 4 I had to put "std::" in front of "ifstream" and also "string" and "getline" as these are all in the standard name space.
It is best to learn how to qualify what is in the standard name space now a little at a time instead of all at once.
Your code is workable, but it does not read all the numbers in a line and it only reads and deals with one line of the file. If you need to read the whole file a while loop is a good choice for reading a file of unknown length. Also in the while condition do not use "eof" to test for end of file as it will not work the way you think it will. You are most likely to process the last read twice.
Should you need to read the file at different times I would put the read in a function and pass the input stream and variables, all by reference, so you do not have to repeat the code several times.
Hope that helps,
Andy