detemining if all the 2D points line on a line or a circle or not in c++ using boolean function
<p>i have made a c++ program to read some 2d values (x,y) from a text file . My code is as follows:</p>

<pre><code>#include&lt;iostream&gt;
#include&lt;sstream&gt;
#include&lt;fstream&gt;
using namespace std;

template &lt;typename T&gt;
class Node {
public:
    T data;
    Node&lt;T&gt;* next;
    Node&lt;T&gt;* previous;

    Node(T data) {
        this-&gt;data = data;
        this-&gt;next = NULL;
        this-&gt;previous = NULL;
    }
};

template &lt;typename T&gt;
class List {
public:
    int size;
    Node&lt;T&gt;* start;
    List() {
    start = NULL;
    size = 0;
}

Node&lt;T&gt;* insert(T data) {
    Node&lt;T&gt;* new_node = new Node&lt;T&gt;(data);
    new_node-&gt;next = start;
    new_node-&gt;previous = NULL;
    if (start != NULL) {
        start-&gt;previous = new_node;
    }
    start = new_node;

    size += 1;

    return new_node;
 }

};

class Point { 
public:
    double x;
    double y;
    Node&lt;Point*&gt;* points_node; 
    Point(double x, double y) {
    this-&gt;x = x;
    this-&gt;y = y;
  }

};

main()
{
    List&lt;Point*&gt;* input_points;
    input_points = new List&lt;Point*&gt;();
    ifstream ifs("input.txt");
    double x,y;
    ifs&gt;&gt;x&gt;&gt;y;
    while(!ifs.eof())
    {
        Point* p = new Point(x, y);
        input_points-&gt;insert(p);
        ifs&gt;&gt;x&gt;&gt;y;
    } 
   bool line=check_line(input_points); // boolean function not defined
   bool circle=check_circle(input_points); // boolean function not defined


} 
</code></pre>

<p>is there any way to write a boolean function to determine if all the points lie on a line or on a circle or not? </p>

<p>Input file format is as follows:</p>

<pre><code>5.0 10.0
10.0 10.0
15.0 10.0
</code></pre>