Features, additional features of C++11, C++14, and C++17, Evolution of Modern C++ Before C++11 , C++ was powerful, but: Very verbose Manual memory management Poor multithreading support Difficult generic programming -------------------------------------------------------------------------------------- C++11 (Maj…
Read moreTemplates A template in C++ is a mechanism that allows us to write generic programs , meaning the same code works for different data types . Needs of Templates Without templates: We must write separate functions/classes for int, float, double, etc. Code duplication increases Maintenance becomes difficult With Templ…
Read moreException Handling In C++, Exception Handling is a mechanism to handle runtime errors in a structured way, so that the normal flow of the program is not terminated abruptly. Exception An exception is an abnormal condition or error that occurs during program execution. Common Runtime Errors Division by zero Array index out of bounds Fi…
Read moreVirtual Class A virtual class usually refers to a class that contains at least one virtual function . Virtual functions enable runtime polymorphism , meaning the function call is resolved at runtime , not at compile time. Virtual classes are mainly used in inheritance to achieve dynamic binding . Function calls are decided at runtime Base cl…
Read more
Social Plugin