Difference between revisions of "Relevant Developer Tutorials"
Jump to navigation
Jump to search
(Created page with "= C++ = Mudlet uses modern C++11 for the core functionality of the application. For programming newbies: * [https://www3.ntu.edu.sg/home/ehchua/programming/index.html#Cpp C+...") |
(→C++) |
||
Line 9: | Line 9: | ||
* [https://www3.ntu.edu.sg/home/ehchua/programming/cpp/cp4_PointerReference.html#zz-1. Pointers] - the core basics of C++. While you can by without needing to know the details, you'll find it really, really useful if you do. | * [https://www3.ntu.edu.sg/home/ehchua/programming/cpp/cp4_PointerReference.html#zz-1. Pointers] - the core basics of C++. While you can by without needing to know the details, you'll find it really, really useful if you do. | ||
* [https://mbevin.wordpress.com/2012/11/13/auto/ C++11] - know how to make your life easier with modern C++11. | * [https://mbevin.wordpress.com/2012/11/13/auto/ C++11] - know how to make your life easier with modern C++11. | ||
+ | |||
+ | == Random tips and tricks == | ||
+ | Determine what auto resolves to with: | ||
+ | |||
+ | template <typename T> struct watzattype; | ||
+ | void TriggerUnit::doCleanup() | ||
+ | { | ||
+ | for(auto & trigger : mCleanupList) | ||
+ | { | ||
+ | watzattype<decltype(trigger)>{}; | ||
+ | |||
+ | Compiler will error and tell you the type, TTrigger*& in this example. |
Revision as of 07:17, 12 April 2017
C++
Mudlet uses modern C++11 for the core functionality of the application.
For programming newbies:
- C++ - covers everything C++ basics to advanced.
For experienced programmers:
- Pointers - the core basics of C++. While you can by without needing to know the details, you'll find it really, really useful if you do.
- C++11 - know how to make your life easier with modern C++11.
Random tips and tricks
Determine what auto resolves to with:
template <typename T> struct watzattype; void TriggerUnit::doCleanup() { for(auto & trigger : mCleanupList) { watzattype<decltype(trigger)>{};
Compiler will error and tell you the type, TTrigger*& in this example.