hey guys i i'm doing a small menu. i need to know how to arrange the alphabet in lines..the user is going to enter. any letter per line they want. please help..thanks
Printable View
hey guys i i'm doing a small menu. i need to know how to arrange the alphabet in lines..the user is going to enter. any letter per line they want. please help..thanks
huh?
Try this:
http://www.catb.org/~esr/faqs/smart-questions.html
There you go, the alphabet arranged in lines.Code:#include <iostream>
#include <cstddef>
#include <algorithm>
#include <iterator>
int main()
{
static const char alphabet[] = { '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' };
static const std::size_t alphabet_count = sizeof(alphabet);
std::copy(alphabet, alphabet + alphabet_count, std::ostream_iterator<char>(std::cout, "\n"));
std::cout.flush();
}