Hello everybody, I am making a program where words on individual lines are read from a .txt file and displayed with a star(*) border.
EXAPLE:
WORD: SHORT
* S H O R T *
T * * * * * S
R * * * * * H
O * * * * * O
H * * * * * R
S * * * * * T
* T R O H S *
I have written code for only the first line (i.e.
* S H O R T *
) but I get a an error while trying to compile, saying: invalid conversion from 'const char*' to 'char'. Please help me out!
Here is my program (any changes or improvements are welcome and appreciated):
Thank you so much! I had completely missed that. But I seem to have a problem with displaying the array from lines 41-43 and I get an error on line 43 saying:
invalid types 'int[int]' for array subscript
.
But if I actually write out the statement, for example, cout<<star[1][1];, then I get output with a line of stars. But the loop doesn't seem to be working. Once again, your help is greatly appreciated!