Computer Science Notes

Notes From CS Undergrad Courses FSU

This project is maintained by awa03

Tar File

Make File

CXX=g++
	hello_make:
		$(CXX) fileName.cpp -o fileName.x

Reading Char

char c;
while ((c = std::cin.get()) != EOF) {
	std::cout << c; 
}

Reading Lines

string line;
ifstream myfile("file.txt");
if (myfile.is_open()){
	while(geline(myfile, line)){
		cout << line << "\n" << endl;
	}
	myfile.close();
}
else { cout << "File could not be opened" << endl; }