What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-11-21 00:01:17
C++ Book an appointment 2. Change an appointment 3. Cancel an appointment 4. View appointment by last name 5. View all appointment
using namespace std; #include <iostream> #include <conio.h> #include <fstream> #include <iomanip> #include <string> #include <stdlib.h> const unsigned short numComponents = 10; unsigned short prices[numComponents]; ... Add solution -
C++ 2021-11-18 23:18:10
read text from file c++
// reading a text file #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("example.txt"); if (myfile.is_open()) { while ( getline (myfile,line)... Add solution -
C++ 2021-11-02 13:38:13
c++ load file as vector
#include <iostream> #include <iterator> #include <fstream> #include <vector> #include <algorithm> // for std::copy int main() { std::ifstream is("numbers.txt"); std::istream_iterator<double> start(is), en... Add solution -
C++ 2021-11-01 20:15:14
opening file in c++
// reading a text file #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("example.txt"); if (myfile.is_open()) { while ( getline (myfile,line)... Add solution -
C++ 2021-10-28 10:43:11
How to read a file in in C++
// io/read-file-sum.cpp - Read integers from file and print sum. // Fred Swartz 2003-08-20 #include <iostream> #include <iomanip> #include <fstream> using namespace std; int main() { int sum = 0; int x; ifstream inFile; ... Add solution -
C++ 2021-10-22 23:17:07
Reading From A File In C++
// reading a text file #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("example.txt"); if (myfile.is_open()) { while ( getline (myfile,line)... Add solution