DEV Community

Akankhya_Singh
Akankhya_Singh

Posted on

Variant

I am a beginner in C++. I wanted to ask if i want to take user input where the compiler don't know the data type before the input. How should i do it? I tried doing it using variant but not able to do it. If there are any methods please suggest.

Top comments (2)

Collapse
 
ilizette profile image
Elizabeth

Hi there. I suggest you add the discuss tag to your post to make it more visible to the intended audience

Collapse
 
akankhya_singh profile image
Akankhya_Singh

thanks