What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-09-03 11:19:01
make an x using asterisk c++
//This is one that will involve user input to create an "X" using //Asterisks. #include <iostream> using namespace std; int main() { int size; cout << "This is where you ask for size: "; cin >> size; fo... Add solution -
Other 2021-09-03 08:35:02
in instantiation of function template specialization 'std::__1::__gcd<int>' requested here
#include <iostream> #include <vector> #include <numeric> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for(int i = 0; i < n; ++i) cin >> a[i]; int ans = a[0]; for(int i = 1; i < n; +... Add solution -
C++ 2021-09-03 02:01:02
error: 'std::high_resolution_clock' has not been declared
#include <chrono> using std::chrono::high_resolution_clock; using std::chrono::microseconds; using std::chrono::duration_cast; auto start = high_resolution_clock::now(); rd(n); auto stop = high_resolution_clock::now(); auto duration = duration_cast... Add solution -
C++ 2021-09-01 06:33:02
C++ how to save data about a object
#include <fstream> #include <iostream> class Something { public: int weight; int size; // Insertion operator friend std::ostream& operator<<(std::ostream& os, const Something& s) { // write out individual members of ... Add solution