How to validate input | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to validate input

I want to validate input up to specific range.How to do it

24th May 2020, 3:54 PM
Krushna Katore
Krushna Katore - avatar
2 Answers
+ 3
That can be done with help of if-else
24th May 2020, 4:14 PM
Vijay Raj Jain
+ 4
you can use std::string there's method called Length use it to validate that input range or if you want the length of char * some_arg int length = sizeof(some_arg) / sizeof(char)
25th May 2020, 3:38 AM
Ahlin Chan
Ahlin Chan - avatar