Program crashing during getline()

I have the following code:
1
2
3
    cin.clear(); clearcin(cin);
    getline(cin, plain);
    cout<<"exiting.\n" << endl;  exit(1004); 


I have 3 const char arrays, 1 with the english alphabet, 1 with the spanish alphabet, 1 with the german alphabet.

I have a char * that points to one of these const char arrays. When the char * is set to english or german, everything works fine and the program returns 1004 as expected. However, when the char * is set to spanish, it stumbles in the getline function. It allows me to enter text, but as soon as i hit enter it farts, gpfs, and dies. I get the message: Process returned -1073741819 (0xC0000005) execution time : 19.016 s inside the codeblocks terminal.

What gives? Why am I forsaken?
closed account (3hM2Nwbp)
0xC0000005 is generated when deferencing an invalid pointer, I believe. You'll have to post more (all) of the code.
If these are const char arrays, you can't point to them with a char* because char* is nonconst.
Well I already tried a const char * but that won't compile. I get some error message. I'd tell you what error message but I've just noticed that my cd with codeblocks on it has just now been infected with a "w32/autorun.jdu.worm". Now I have to go buy a new CD, walk to the subway, buy a ticket, head west 2 stations, walk to the other end of the station, burn a new cd with codeblocks at the free computer lab, then spend the next week or two searching for a new library that doesn't have infected computers from which I can run codeblocks from cd.

Oh, by the way, I forgot to mention that the const char arrays and the char * works on windows xp, just not windows vista or windows 7.

I guess I'll just have to add a few more names to my list.
edit: i tried it again and this time the same thing happened, except this time it returned:

Process returned 255 (0xFF)   execution time : 169.338 s
Press any key to continue.
Topic archived. No new replies allowed.