C++: Data Type conversions

Objectives:

  • Conversation of "Char" to "Integer" data type conversion:
  • function : n1 = atoi(ch1);  
  • Caution: Has some restrictions, and many GUI/Compiler won't recognize "atoi"

 

Step: 1 Create new source file

Step: 2 Add code to the source file, and build it using build tool (hammer image).

Step: 3 Runtime views