Я понимаю, что в прошлом этот вопрос можно было задавать несколько раз, но я буду продолжать независимо.
У меня есть программа, которая будет получать строку чисел с клавиатуры. Цифры всегда будут в форме "66 33 9". По сути, каждое число разделяется пробелом, и пользовательский ввод всегда будет содержать различное количество чисел.
Я знаю, что использование 'sscanf' будет работать, если количество чисел в каждой введенной пользователем строке было постоянным, но для меня это не так. Кроме того, поскольку я новичок в С++, я бы предпочел иметь дело с "строковыми" переменными, а не с массивами символов.