Odds and Ends: 10 Useful Techniques

A quick tour of ten useful techniques in C++, covering dates, randomness, attributes and more

Ryan McCombe
Updated
Hello! I'm here to help you with any questions about this lesson. Feel free to ask me anything - whether it's about specific concepts, examples, or how to apply what you've learned!

Questions & Answers

Answers are generated by AI models and may not have been reviewed. Be mindful when running any code on your device.

When to use std::vector vs std::array
When should I use std::vector and when should I use std::array in C++?
Measuring execution time with
How can I measure the execution time of a function using the library?
Choosing the right random number distribution
How do I choose the appropriate random number distribution for my use case?
Using [[nodiscard]] with custom types
How can I use the [[nodiscard]] attribute with my own custom types?
Creating a custom ClangFormat style
How can I create a custom ClangFormat style for my C++ project?
Integrating static analysis tools into your workflow
How can I integrate static analysis tools like Cppcheck into my C++ development workflow?