Control flow / Interruption of a control flow

#include <iostream>
using namespace std

int numbers[] {23571113};
string str = "";
for (int n : numbers) {
    if (n > 10) {
        break;
    }
    str += (str == "" ? "" : "-") + to_string(n);
}
//str is "2-3-5-7"

cout << "str is '" << str << "'";