T
T
tamtakoe2020-07-17 16:33:45
C++ / C#
tamtakoe, 2020-07-17 16:33:45

How to convert variant to string?

Need to convert to string How to do it? and don't work (c++17) variant<std::string, int> value = 100"100".

std::get<std::string>(value)(std::string)value

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egorithm, 2020-07-17
@EgoRusMarch

std::stoi()
std::to_string()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question