Write a program that will read ina file of points in a format like this: and out
ID: 3614364 • Letter: W
Question
Write a program that will read ina file of points in a format like this:
and output them as ordered pairs, i.e.like this:
#include <iostream>
#include <string>
#include <fstream>
double* file(string,double&,double&, int);
using namespace std;
int main()
{
char junk;
int size1, size2;
size1=size2;
double* x = file("input.txt",size1);
double* y = file("input.txt",size2);
cout<<junk<<x<<junk<<y<<junk;
return 0;
}
double* file (double& x, double& y, int& size)
{
ifstream fin( input.c_str());
fin>> size;
for ( inti = 0 ; i<6; i ++)
{
fin>>x>>y;
}
return double;
}