Originally posted by: notfred
You really have to learn the basics. I think you may have been getting too much help on these forums that has let you use our code without having to figure out things for yourself.
In your code above, you declare an int called i. An int is an integer value, remember?
then you declare a character called "the"
Do you know what a character is? A character is a single character on the keyboard, for example 't' or '5' or ','. Note that each of those is just ONE symbol. You have to use an array of characters to hold more than just a single value. if you want to use "the" you need a character array that can hold 4 characters.
Now, you never actually assign a value to "the", but I'm pretty sure you are acting like you want it to contain the string "the".
Thenyou do this:
for(;i = the; ++i);
You try to assign "the" to i.
You never gave "the" a value. Even if you had, it would have been a character, and you're trying to assign it to an int.
How about you do something for us. Take the code you wrote above, and post it again in another post. Then try to explain to us, very explicity, what it is that each line of your code does. If you can tell us what it does, that means that you actually know what you're doing. If you can't tell us what it does, that means your going to have to go look it up before you finish the post, and it might help you learn the material.
I'm not trying to be a smartass here, I'm just trying to encourage you to learn exactly wha tit is that your code is doing.