What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-11-19 05:51:16
how to check type in c++
#include <typeinfo> #include <iostream> class someClass { }; int main(int argc, char* argv[]) { int a; someClass b; std::cout<<"a is of type: "<<typeid(a).name()<<std::endl; // Output 'a is of type... Add solution -
Other 2021-10-01 09:12:04
Daemon Processes program
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> int main(int argc, char* argv[]) { FILE *fp= NULL; pid_t process_id = 0; pid_t sid = 0; // Crea... Add solution -
C++ 2021-09-29 04:48:02
how to read wav file in C++
#include <iostream> #include <string> #include <fstream> #include <cstdint> using std::cin; using std::cout; using std::endl; using std::fstream; using std::string; typedef struct WAV_HEADER { /* RIFF Chunk Descriptor */ ... Add solution -
C++ 2021-09-28 16:43:04
recursion in cpp with reference
#include <iostream> #include <cstdlib> //had to force it becasue my compiler (Code::Blocks) does not contain system. using namespace std; /*int n = 1, sum = 0; int sumDigits(int n, int sum) { // if (n == 0) { return sum; ... Add solution -
C++ 2021-09-19 14:18:02
c++ print 3d cube
#include<gl/freeglut.h> double rot = 0;float matCol[] = {1,0,0,0}; void display(){ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glPushMatrix(); glRotatef(30,1,1,0); glRotatef(rot,0,1,1); glMaterialfv(GL_FRONT,GL_DIFFUSE,matCol);... Add solution -
C++ 2021-09-10 12:21:02
defining class in other file in c++
//ClassOne.hpp: class ClassOne { public: ClassOne(); // note, no function body int method(); // no body here either private: int member; }; //ClassOne.cpp: #include "ClassOne.hpp" // implementation of constructor ClassOne::Class... Add solution
Best helpers
Ranking is empty