I think a good exercise to learn and troubleshoot different errors is to take a fairly complex program, say at least half a k-loc, in a one-file .c or .cpp, that compiles and executes just fine in any environment.
Then accompany it with exercises to break the code in different ways, e.g.
1: Remove semicolon at the end of line and compile
2: Run a non-input params function without () and compile
3: Assign value to the destination of a pointer without checking whether it is a null-pointer, compile and execute
4: Assign a negative value to an unsigned variable compile and execute
5: assign value to array[10] with size(array) = 10 or less and compile and execute
6: Use the std::numeric_limits<float>::epsilon (without ()) in a context and compile.
...
Analyze the error messages and describe what they mean. Any interesting error messages or program crashes that have taken a looong time to troubleshoot?