Questions
C++ questions
Choose a question page, learn the concept, then test your understanding with a quiz.
Basic Rules and Idioms for Operator Overloading in C++
Learn the core rules, syntax, and common idioms for operator overloading in C++, including member vs non-member operators.
C++ Casts Explained: C-Style Cast vs static_cast vs dynamic_cast
Learn the difference between C-style casts, static_cast, and dynamic_cast in C++ with clear examples, safety rules, and real usage tips.
C++ Lambda Expressions Explained: What They Are and When to Use Them
Learn what C++ lambda expressions are, why they exist, when to use them, and how they simplify callbacks, algorithms, and local logic.
C++ Value Categories Explained: lvalues, rvalues, xvalues, glvalues, and prvalues
Learn C++ value categories clearly: lvalues, rvalues, xvalues, glvalues, and prvalues, with examples and why C++11 introduced them.
C++ typedef vs using: Type Aliases Explained
Learn the difference between C++ typedef and using, including type aliases, alias templates, syntax, and when to use each.
C++11 Memory Model Explained: Threads, Atomics, and What Changed
Learn what the C++11 memory model is, why it matters for threads and atomics, and how it changed safe concurrent C++ programming.
Class vs Struct in C++: When to Use Each
Learn the difference between class and struct in C++, when to use each, common conventions, examples, and practical coding guidance.
Copy-and-Swap Idiom in C++: What It Is, Why It Matters, and When to Use It
Learn the copy-and-swap idiom in C++, how assignment works, what problems it solves, and how C++11 move semantics affect it.
Dependent Names, typename, and template in C++ Templates
Learn when and why to use typename and template with dependent names in C++ templates, with clear examples and common pitfalls.
Handling Cycles in Family Tree Graphs in C++ and Qt
Learn how to model and process cycles in family tree software using C++ and Qt without breaking assertions or graph logic.
How to Convert int to String in C++
Learn how to convert int to string in C++ using std::to_string, stringstream, and older approaches with clear examples.
How to Iterate Over Words in a String in C++
Learn how to iterate over whitespace-separated words in a C++ string using stringstream, extraction operators, and clean loop patterns.
How to Learn C++ from Books: A Beginner-Friendly Guide to Choosing the Right C++ Book
Learn how to choose good C++ books by skill level, avoid bad resources, and build a practical C++ learning path with confidence.
How to Profile C++ Code on Linux
Learn how to profile C++ code on Linux to find slow functions, bottlenecks, and performance hotspots using practical examples.
Improving Object Recognition Algorithms in OpenCV with Template Matching and Feature-Based Detection in C++
Learn how to improve OpenCV object recognition in C++ for scale, rotation, noise, occlusion, and false positives using practical techniques.
Pointer vs Reference in C++: What’s the Difference?
Learn the difference between pointers and references in C++ with syntax, examples, mistakes, and practical use cases.
Pointers vs Objects in C++: Why Use a Pointer Instead of the Object Itself?
Learn when to use pointers vs objects in C++, how memory and ownership work, and why direct objects are often the better default.
The Rule of Three in C++: Copying Objects, Copy Constructor, and Copy Assignment
Learn the Rule of Three in C++: what object copying means, when to define copy operations, and how to prevent copying safely.
Undefined Reference and Unresolved External Symbol Errors in C and C++
Learn what undefined reference and unresolved external symbol errors mean in C and C++, their causes, fixes, and how to prevent them.
What Are Smart Pointers in C++ and When Should You Use Them?
Learn what smart pointers are in C++, how they manage memory automatically, and when to use unique_ptr, shared_ptr, and weak_ptr.
Page 1 of 2 - 32 questions