Is it good practice to convert string to int?

image

Hi, could someone please tell me if such conversions (string to other types) are commonplace in coding ethics or should I avoid them?

Also, does type casting not work between an int and a string variable?

Privacy & Terms