Hacker News new | comments | show | ask | jobs | submit login

Questioning what the -Wall -Wextra -pedantic arguments mean would be better. This is how you find those typos in the real world.

Ask them about compiler errors. For example, what does "undefined reference to `vtable for Foo'" mean?

Then some style guide [0] might be helpful. Make them write the rvalue expression to the left of comparisons, because "if (3 = x)" is an error then. Or some "assert (this != NULL)" in methods.

Ask about semantics, like "What is the difference between a move and a copy constructor?" or "Write a program to demonstrate the difference between any two of static_cast,dynamic_cast,reinterpret_cast,const_cast,implicit cast" or "When should you use unique_ptr instead of shared_ptr?"

[0] http://google-styleguide.googlecode.com/svn/trunk/cppguide.x...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: