Compiled fine for me. It looks like the code you pasted is different than the code that you posted ("vector >" from the error). Another possibility is that your compiler is too old. Visual C++ 6.0 should be trashed, try Visual Studio 2005 Express (free download) or Dev-C++ .
>I wraped the codes in and then wraped that in
Well, good for you for reading the rules and figuring out how to use them.
>Is there anything I can do to change this, and make my code more readible?
Here's how the tags work:
Wrap code in [code] and [/code] if you have a section of code, although it won't be colored (all green).
Wrap code in [code=language] and [/code] for syntax coloring. (Here you would use [code=c] or [code=cplusplus]).
Finally, use inline code tags like you mentioned using for code alongside text, like this:
This is my inline code.
[edit] By the way: I like your signature :D
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
>Thanks for the help!
You're welcome.
>I didn't expect to get a reply this quick.
As long as there's losers like me who are on DaniWeb nearly 6 hours a day, there's going to be quick replies. ;)
>I imported the project to Dev-C++, tried compiling and it worked!
That's good to hear. Now you see why having an up-to-date compiler is essential.
>Even though I have no idea why the declaration would be a problem for some compilers.
I think it has something to do with the typedef statement being within the main() function. I'm not entirely sure though, as I've never run into that problem.
[edit] Actually, I don't think it's a very good idea at all to use typedef inside main(). The reason I've never run into that problem is because I've never done that. I can't find any articles on whynot to do it, but again, I haven't had much experience with this keyword, other than for a little bit of programming convenience in my projects.[/edit]
>sorry I can't say the same for your signature --- I got absolutely intimidated by the tone while reading.
Heh, don't worry about it my friend. That document is more aimed at the massive amounts of newbies we get here who ask for homework help without showing any effort, use leet speak, and in general don't care to read the rules. You actually asked a very good question, and I appreciate that you took the time to do so. Thank you.
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339