|
Search Tech-Forums - link takes you to our Forum's search page. Note: The following is only a text archive! To view the actual forum discussion, please visit our website at http://www.tech-forums.net Pages:1 STL in Microsoft C++(Click here to view the original thread with full colors/images)Posted by: jeelliso Hello, I'm a long time C++ programmer, but this is my first time compiling in Windows. I'm using Microsoft C++ Visual Studio Express 2005. I'm creating a routing program for network simulation and I have a class called Neighbor (already defined). I need to make a "list" of them using the Standard Template Library. Here is the code I'm using: [CODE]list<*Neighbor> neighbors;[/CODE] and here is the errors that result: [CODE]error C2143: syntax error : missing ';' before '<' error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2238: unexpected token(s) preceding ';'[/CODE] I found [URL=http://msdn2.microsoft.com/en-gb/library/3bsk3zs9(VS.80).aspx]file[/URL] file on the MSDN website with a similar example. I seem to have the syntax correct, but I can't get it to compile. I've also tried this with just an int instead of a Neighbor class object. If I've missed something specific to Windows please let me know. Any other ideas are also welcome. Thanks, ~Justin Posted by: ryno [code] list<Neighbor*> neighbors [/code] Posted by: jeelliso [QUOTE]list<Neighbor*> neighbors[/QUOTE] Good call. Sometimes is just takes a pair of fresh eyes to pick up such a simple mistake. Thanks, Posted by: ryno You're welcome. vBulletin Copyright ©2000 - 2003, Jelsoft Enterprises Limited. PPC Management vB Easy Archive Final - Created by Xenon |