Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
And you should really work on your code formatting. That looks terrible. ;)
If the poster doesn't use code-tags, all formatting will be automatically lost, so the codemight actually be properly formatted....
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
>and it doesnt mention code-tags
Code tags are a feature of Daniweb's forum. You take your code and wrap it in code tags like so when you want to post it here:
[code=cplusplus]
[/code]
This preserves the formatting of your code rather than trimming all leading whitespace from it. With the cplusplus attribute, line numbers and color coding are also added. Here's how code looks without code tags:
#include
int main()
{
for ( int i = 0; i < 10; i++ )
std::cout<<"Hello, world!\n";
}
And here's the same code with code tags:
#include <iostream>
int main()
{
for ( int i = 0; i < 10; i++ )
std::cout<<"Hello, world!\n";
}
Notice the difference?
p.s. We give you about 10 posts to learn how to use code tags, then start issuing infractions for each failure to use them. At 2 points per infraction, that means you can get off five posts before you're automatically banned for not following our rules.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
In the function inword() , i dont understand why you are creating new vector words and a character variable guess.
Instead of doing that. Pass them as arguments for the function or declare them globally and dont declare them again in the function itself.
Sky Diploma
Practically a Posting Shark
865 posts since Mar 2008
Reputation Points: 673
Solved Threads: 131