
please wait
<fstream>
? I can't see you using any file streaming and you don't need to for this assignmnet.switch
block there is this wrong line:void printVertically(string name, int i);
void
word to call the function. You can't redeclare the function when you call it. The compiler won't allow this illogical behavior. You also need to remove the word string
for the same reason. You also need to remove that int i
because you are not using any i
from outside the function. That means that you need to have the following as a function prototype:void printVertically(string name);
main
program? Remove these:
|
|
length()
vs size()
thing: size()
is an alias for length()
. They both do the same thing. Just make sure that you use it as a method, not a data member. That means rewriting that for
loop in your printVertically
function definition as:for (int i = 0; i < name.size(); i++)