Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

how to read (convert into integer) the integer data from the keyboard

$
0
0
hi,

i want the code to read the values from keyboard even if u give a character it need to convert into the valid integer.

i tryed with code


main()
{
int x;

std::cin<<(int)x;
..
.
..
.
.


}

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>