What do you want to save?
Add Code snippet
New code examples
-
-
C++ 2021-10-23 10:43:06
For auto map C
//Since c++11 for (const auto& kv : myMap) { cout << kv.first << " has value " << kv.second << endl; } //Since c++17 for (auto& [key, value]: myMap) { cout << key << " has value " <... Add solution -
C++ 2021-10-23 02:18:07
how to calculate trigonometric values in c++
* * C++ Program to Illustrate Trigonometric functions */ #include <iostream> #include <iomanip> #include <cmath> const double PI = 3.14159265; int main() { double degrees, radians; std::cout << "Enter angle in de... Add solution -
C++ 2021-10-22 09:34:09
call by reference c++ example
//call by reference example c++ #include <iostream> using namespace std; void swap(int& x, int& y) { cout << x << " " << y << endl; int temp = x; x = y; y = temp; cout << x << " "... Add solution -
C++ 2021-10-19 13:05:16
detect cycle in an undirected graph c++
// A C++ Program to detect // cycle in an undirected graph #include<iostream> #include <list> #include <limits.h> using namespace std; // Class for an undirected graph class Graph { // No. of vertices int V; // ... Add solution