Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Programs and Daily Task. #80

Merged
merged 6 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added C++/Server.cxx
Empty file.
35 changes: 34 additions & 1 deletion C++/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
#include <conio.h>
#include <string.h>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <memory>

#define MAX 65535;
#define MIN 1;
Expand All @@ -12,7 +15,37 @@ int main(int argc, char **argv){
std::cout << ":: \t C++ Programming - OOP !! :: " << std::endl;
std::cout << "\n\t ============================== \t\n" << std::endl;

std::vector<std::string> res;
std::string data = "C++ is Cool!";

for(size_t c = 0; c <= 99; ++c) {
res.push_back(data);
std::cout << data << " -> " << c << " - times" << std::endl;
}
std::cout << std::endl;
std::cout << "Length of Vector: " << res.size() << std::endl;
std::cout << "\n\t ============================== \t\n" << std::endl;

std::unique_ptr<Overload<bool>> ptr(new Overload<bool>);
std::cout << "Is Overloaded class? -> " << ptr->isOverload << std::endl;
return (0);
}
}

const char* displayX() noexcept {
return "-X*X*X-";
}

template <class T> class Overload: public std::vector<T> {
public:
std::vector<std::vector<T>> LONG_LIST_UINT;
bool isOverload = false;
bool isVector = true;
Overload() { }
~Overload() { }
Overload(bool x, bool y) {
this->isOverload = x;
this->isVector = y;
char* sayX = displayX();
std::cout << *sayX << std::endl;
}
};
Loading