What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-01-22 17:11:01
how to check char array equality in c++
// syntax #include <cstring> // this needs to be at the top of the script/code std::strcmp(<1st-char>,<2nd-char>) // example (assuming: char_1 = 'Compare me'; char_2 = 'Compare_me') #include <cstring> if (std::strcmp(char_1,cha... Add solution -
C++ 2022-01-22 02:00:15
Oriented and unoriented graphs C++
#include <iostream> using namespace std; // stores adjacency list items struct adjNode { int val, cost; adjNode* next; }; // structure to store edges struct graphEdge { int star... Add solution -
C++ 2022-01-21 23:30:33
PI IN C++ WITH CMATH
#include <iostream> #include <cmath> using namespace std; float area(int radius) { return M_PI * (radius * radius); } int main () { cout << "Area of a circle with radius 7 unit is: " << area(7); } Add solution