Symptoms of bigger data structure problems. An array of 1 really isn't an array at all.
Originally Posted by yurci
char *gam; // This is for storing SCALES, This size for now.
char *sual; // This is my input array for searching
char g; // This cin my NOTE input and assigns it to sual array for further.
All those pointers need to be pointing at useful addresses, and they make up the elements of a majority of your arrays. It is risky to store literal strings in such an obvious way because the minute you try to write to them, they invoke undefined behavior, because they (the literal strings, as in "G") are stored in read only memory.
char *gam; // declare gam as array, 3 of array, 8 of pointer to char
char *sual // declare sual as array, 7 of pointer to char
char g // declare g as array, 1 of char
Since this is C++ you really ought to make your life easier:
Of course, not that I'm suggesting you ignore C strings forever, lest you be fated to be satisfied with crappy algorithms because of a lack of foundational knowledge. When there are better things out there. In a way, string is C strings, contained. You should take advantage.