Hi! I'm having some trouble with char pointers, arrays and all that stuff.
I wrote a simple programme which should let me know every time it finds a letter 'a' in an array. But it outputs nothing even if I write only 'a's.
Here's my code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
char * input;
if(input[i]=='a')cout<<"There's an 'a' within the array"<<endl;}
#Moschops, I compiled it several times, even added a cout<<whatever, changed the variable names, rebooted my PC, but still doesn't work!
How is this possible?
Here's the complete code with some cout<<...'s I put to see if anything changed. I am using Visual Studio C++ 2010 Express.