What do you want to save?
Add Code snippet
New code examples in category C++
-
Florecita 2021-08-29 16:57:02
open hashing basic operations
//open hashing , insertion,deletion,searching,displaying #include <iostream> using namespace std; #define n 5 class node { public: int data; node*next; }; node*hasharray[n]; void init() { for(int i=0;i<n;i++) { hasharray[... Add solution -
Rose Letters 2021-08-29 13:48:01
c++ fizzbuzz
// a short fizzbuzz, can make smaller by removing spaces #include <iostream> int i; int main() { for (auto &o=std::cout; ++i < 101; o<<'\n') i%3? o : o << "Fizz", i%5? i%3? o << i :o : o << "Bu... Add solution -
-
Dilan Peiris 2021-08-29 10:45:02
ray sphere intersection equation
float hit_sphere(const vec3& center, float radius, const ray& r){ vec3 oc = r.origin() - center; float a = dot(r.direction(), r.direction()); float b = 2.0 * dot(oc, r.direction()); float c = dot(oc,oc) - radius*radius; float d... Add solution -
Teresa Vandal 2021-08-29 08:28:03
how to get PID by name in c++
#include <Windows.h> #include <iostream> #include <Tlhelp32.h> #include <comdef.h> /*snapshot for all running processes*/ HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, NULL); PROCESSENTRY32 pEntry; /*initializing ... Add solution -
Andrew H Chapman 2021-08-29 07:57:01
how to take continuous input in c++ until any value. Like for example(taking input until giving q)
summ = 0 count = 1 while raw_input("Enter q to quit or any other key to continue") != 'q': summ = summ+input() count=count+1 print summ/(count*1.0) Add solution
Best helpers
Orlp
+5
Brenten1
+5
Kunder
+5
NullPointer
+5
Roshan
+5
Sg qy
+5
Bryce Wagner
+5
Rn tmssn
+5
Lara
+5
TheBeege
+5
Lim
+5
Affable Geek
+5
JCM
+5
Dasedes
+5
Mark Walsh
+5
Adb
+5
Chd
+5
RMalke
+5
Sam C.
+5
James Gentes
+5
Skout
+5