Answer the question
In order to leave comments, you need to log in
How to split a string in c++?
You need to split the string by sign. That is something like this:
#include <iostream>
int main()
{
int a;
std::cin >> a;
//пользователь ввел 23+56
a = input()
a = a.split('+')
num1 = a[0]
num2 = num[1]
Answer the question
In order to leave comments, you need to log in
https://www.fluentcpp.com/2017/04/21/how-to-split-...
https://www.cyberforum.ru/cpp-beginners/thread1623...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question