C++ Learning mode suggestion: signness

Concept Arrays and Vectors in C++ on Exercism introduces size member function, which return type is size_t (a.k.a. unsigned long)

This causes simple loop structure, such as for (int count{0}; count < layers.size(); ++count) causes different signness compare warning, and then promote warning into error.

No learning concept introduces what size_t or unsigned is, making new learners confused why they got error.

My suggestion is either

  • suppress signness compare warning, or
  • intruduce concept regarding signness.

Context: Type mismatch error(?) on Lasagna Master C++ on Discord channel

1 Like

Huh. I hadn’t noticed, but it looks like some types are not properly introduced. The unsigned keyword should be introduced along with number types.