#include <cctype>
#include <iostream>
#include <limits>
#include <ostream>
int main()
{
char c = std::numeric_limits<char>::min();
do
{
if (std::isalpha(c))
std::cout << c << ' ';
}
while (c++ != std::numeric_limits<char>::max());
std::cout << std::endl;
}
(output edited for readability)
ƒ „ ‡ ˆ ‹ Œ Ž ‘ ’ “ ” • – — ˜ ™ š › œ ž Ÿ
¡ ¢ £ ¤ ¥ ¦ § ¨ « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹
º » ¼ ½ ¾ À Â Ã Ä Å Æ Ç È Ë Ì Í Î Ð Ñ Ò Ó Ô Õ Ö
× Ø Û Ü ß à ã ä ç è ë ì ï ð ó ô ÷ ø ü A B C D E
F G H I J K L M N O P Q R S T U V W X Y Z a b c
d e f g h i j k l m n o p q r s t u v w x y z
You should not check from the very lower value of a char.
As the assertion failure (in VS10) shows, using a value under 0 shouldn't be used. Not talking about the standard, but, you should only try positive values.