PowerBI Data Analyst - Create visualizations and dashboards from scratch
Save 40% on 3 months of Coursera Plus
Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to build a custom string class in C++ by implementing your own version of std::string from scratch. Master dynamic memory management, the Rule of 3/5, and essential string operations through hands-on coding. Explore class structure design, default and parameterized constructors, deep copy mechanisms, and destructor implementation. Implement the copy-and-swap idiom for safe copy assignment, along with move constructor and move assignment for efficient resource management. Add core functionality including length() method, c_str() access, substr() for string extraction, operator[] for indexing, and equality/inequality comparison operators. Follow modern C++ practices while understanding the internal workings of string classes, memory allocation strategies, and performance optimization techniques that make std::string so effective in real-world applications.
Syllabus
00:00 – Introduction
01:38 – Class structure
02:00 – Default Constructor
02:16 – Parameter Constructor
04:15 – Move Constructor
04:40 – Move Assignment
Taught by
CppNuts