Loose-GNSS-IMU/Loose-GNSS-IMU/FileIO.cpp
// File Opener --> Initiates File pointer safely
File Opener --> Initiates File pointer safely
File Opener -- > Initiates File pointer safely
void FileIO::fileSafeIn(string filename, ifstream& fin) {
	ifstream inputfile(filename);
	if (!inputfile.is_open())
	{
		perror("Error while opening file");
	}
	else if (inputfile.bad())
	{
		perror("Error while reading file");
	}
	else
	{
		fin.open(filename);
	}
}
void FileIO :: fileSafeIn ( string filename , ifstream & fin ) { ifstream inputfile ( filename ) ; if ( ! inputfile . is_open ( ) ) { perror ( " " ) ; } else if ( inputfile . bad ( ) ) { perror ( " " ) ; } else { fin . open ( filename ) ; } }
File Opener --> Initiates File pointer safely
File Opener -- > Initiates File pointer safely
// Use input file stream, detect file // Check if file can be opened // Check is file can be read // If no errors, we safely open the file...