Have you considered the problem is your functions on line 22 and 29.
Some other problems:
1) You are using global variables.
2) You are using usingnamespace std; instead of std:: prefix
3) you have void as the return type of the main function that returns an int.
4) Line 15 and 16 you should call the function not output the function since they return nothing.
5) line 26 can be appended to line 25.
6) line 31 seems weird since that would make line 15 be called twice when you get to line 16.
7) again line 36 can be appended to line 35. std::cout << ch << std::endl;
Anyways, what are the functions on 22 and 29 supposed to be doing?
well the assignment is to read in from a file of animal names and then output to the console the pattern of their name. For example of the word was dog it would output
dddd
ooooooooooooooo
ooooooooooooooo
ggggggg
ggggggg
ggggggg
thats because d is the first letter in the word and 4th letter in the alphabet then o is 2nd letter in the word and 15th in the alphabet and so on. Im so confused by this and have no idea what to do.
so function line should print out something like "line('a', 10)" aaaaaaaaaa
and rectangle should do the same thing. "rectangle('a', 3, 4)"
aaa
aaa
aaa
aaa