TinyXML2 Parser Tutorial using C++ (Read – Write)

C++, without any doubt, is the most popular programming language that can be found literally everywhere. since its birthdate in 1985, C++ has been the base language for learners, engineers, scientists, and researchers. In some instances, an application written in C++ may require saving and retrieve data that is located in an XML file. There … Read more TinyXML2 Parser Tutorial using C++ (Read – Write)

How to remove duplicates from an array of integers in C++?

The following piece of code traverses the list of integers, removes duplicate numbers, if any, and returns the remaining list. #include <iostream> #include <vector> #include <algorithm> void removeDuplicates(std::vector<int> &list) { auto end = list.end(); for (auto i = list.begin(); i != end; ++i) { end = std::remove(i + 1, end, *i); } list.erase(end, list.end()); } … Read more How to remove duplicates from an array of integers in C++?