So i'm trying to create a program, that would make a thread of an infinite function that would keep running, while the program keeps doing other stuff. But i'm having problems making the thread. As far as i can understand, its because im somehow trying to copy somekind of a stream, but what exactly this error means and how to fix it, i havent got a clue.
#pragma once
#include <fstream>
#include <iostream>
#include <vector>
class PS
{
public:
//constructors
PS(char adrese[80], int IntervalInSec);
virtual ~PS();
//read data from node to object once
void readDataFromNode();
//get dataset from object
std::vector<std::string> getDataSet();
//print the existing dataset
void print();
//call readDataFromNode indefinitily with an interval of int Interval
void getDataIndef ();
protected:
private:
//members
std::ifstream myfile ;
std::vector<std::string> dataset;
char directory[80];
int Interval;
}; //this is the 28th line, which throws an error