C++ Codes
Algorithms
Algorithm Analysis in C++
Beginners
Code Snippets
Graphics
Data Structures
File Manipulation
Games
Mathematics
Miscellaneous
Visual C++ Library
C++ > Code Snippets sample source codes
Read a character using cin
Read a character using cin #include
#include
int main() { char mychar[100]; int i = 0; //while the character is not a new line while((mychar[i] = cin.get()) != '\n') i++; mychar[i] = NULL; //display characters cout<
Privacy Policy
|
Link to Us
|
Links