What do you want to save?
Add Code snippet
New code examples in category C++
-
A-312 2022-03-21 18:45:23
worker class c++
#ifndef EMPLOYEE_H #define EMPLOYEE_H #include <string> using namespace std; class Employee { private: string name; // Employee name string number; ... Add solution -
A-312 2022-03-20 09:10:06
tuple with functions c++
#include <tuple> #include <iostream> #include <string> #include <stdexcept> std::tuple<double, char, std::string> get_student(int id) { if (id == 0) return std::make_tuple(3.8, 'A', "Lisa Simpson"); i... Add solution -
Krish 2022-03-19 23:20:17
check file exist cpp
#include <sys/stat.h> #include <unistd.h> #include <string> #include <fstream> inline bool exists_test0 (const std::string& name) { ifstream f(name.c_str()); return f.good(); } inline bool exists_test1 (const std::str... Add solution