If the size is unknown, it is best to use vectors. Vectors are resizeable.
So you can simply create vector of type int, and store file contents there.
#include <vector>
using std::vector;
.
.
.
vector <int> data;
for (int i=0; i<sizeof (pointerToText); i++)
{
data[i] = something;
}