exercism / cpp

Exercism exercises in C++.
https://exercism.org/tracks/cpp
MIT License
251 stars 205 forks source link

log-levels concept exercise needs a more fleshed-out stub #799

Closed glennj closed 4 months ago

glennj commented 5 months ago

Two points

https://discord.com/channels/854117591135027261/1157359032760287302/1205523943021219850

glennj commented 5 months ago

The stub file could contain this:

namespace log_line {
    std::string message(const std::string& line) {
        // return the message
    }

    std::string log_level(const std::string& line) {
        // return the log level
    }

    std::string reformat(const std::string& line) {
        // return the reformatted message
    }
}
vaeng commented 4 months ago

I agree with you, the students can learn probably learn more from strings, when the functions are out of the way. At this point they do not know about const and references yet, so I would keep it very basic.

vaeng commented 4 months ago

I made a pr #806