#include
#include
#include
#include
#include
using std::ifstream;
using namespace std;
You cannot have variable length arrays (as they are called in C99) in C++. You need to use dynamically allocated arrays (if the size varies) or a static integral constant expression for size.
The size of an automatic array must be a compile-time constant.
const int size = 100;
float x[size][2];
If the size weren't known at compile-time (e.g entered by the user, determined from the contents of the file), you'd need to use dynamic allocation, for example:
std::vector<std::pair<float, float> > x(somesize);
(Instead of a pair, a dedicated Point struct/class would make perfect sense.)