I have the following array of wide characters:
wchar_t alphabet[] = L"abcdefghijklmnñopqrstuvwxyz"; /* array of wide characters */
Everytime I try to run the following code, a "segmentation violation" error occurs
printf("%ls %d\n", alphabet, wcslen (alphabet));
int i;
for (i = 0; i <= wcslen (alphabet); i++)
{
printf("%ls\n", alphabet[i]);
}
How can I correct this error?