Hi everyone, I'm a first year cs student so I don't really know what i'm doing yet. Anyways, one of our assignments is to combine two ASCII pictures (balloon and sunset) together. I have an idea of how to do it:
Code:
for (int i=0; i < baloon.length(); i++){
if (baloon ==" ")
combined[i] = sunset[i];
else
combined [i] = baloon[i];
}
This should replace all the empty spaces with the other (sunset) picture, right? But i'm assuming something's wrong with the "if" statement, because all I see when I run the program is the picture of the balloon. The pictures are drawn right into the program btw. I just spent the last 3 hours thinking this through (as much as i like programming, I suck at it.) and trying different loops, because I really wanted to solve it on my own, but I definitely need some assistance. Thanks so much in advance.