What do you want to save?
Add Code snippet
New code examples
-
-
Other 2021-11-09 19:39:29
huffman coding algorithm code
// Huffman Coding in C++ #include <iostream> using namespace std; #define MAX_TREE_HT 50 struct MinHNode { unsigned freq; char item; struct MinHNode *left, *right; }; struct MinH { unsigned size; unsigned capacity; struct MinHNode **... Add solution -
C++ 2021-11-09 15:45:13
what are access specifiers in c++
class MyClass { // The class public: // Access specifier // class members goes here }; The public keyword is an access specifier. Access specifiers define how the members (attributes and methods) of a class can be accessed. In the exampl... Add solution -
C++ 2021-11-09 15:24:26
What is the meaning of inheritance in C++. Write an example of simple inheritance.
Inheritance is one of the key features of Object-oriented programming in C++. It allows us to create a new class (derived class) from an existing class (base class). The derived class inherits the features from the base class and can have additional feat... Add solution -
C++ 2021-11-09 07:07:14
time function c++
/* Answer to: "time function c++" */ #include <chrono> using namespace std::chrono; auto start = high_resolution_clock::now(); auto stop = high_resolution_clock::now(); auto duration = duration_cast<microseconds>(stop - start);... Add solution -
Other 2021-11-05 04:17:12
iterator on std::tuple
#include <tuple> #include <iostream> int main() { std::tuple t{42, 'a', 4.2}; // Another C++17 feature: class template argument deduction std::apply([](auto&&... args) {((std::cout << args << '\n'), ...);}, t); } Add solution -
Other 2021-11-03 21:00:11
c programming language
// Creator /* Creator Of C Language: Dennis Ritchie */ // Advantages And Diadvantages Of C. /* C is very Fast And Easy Language, Gives more control over the hardware But it's not a safe language, What i mean by that is tht it's well, It dosent suppor... Add solution