Skip to main content
gamedev.net
🔒 Locked

Game mud programming code error

Started by muphicks 5 replies 850+ views
Original Post
muphicks
muphicks
Lo all, Anyone here bought the mud game programming book by ron penton? I''ve worked through to the chapter on connection managers and protocols. This uses a lot of template code and for some reason I cannot get any of it to compile under vc++ 2003. Are there any known problems with the way vc++ 2003 handles template code? Or any program updates I''m not aware of. If nobodys got the book, or having a similar prob, I''ll dig out the error messages and post those to see if anyone has any ideas. I''m at work atm though so don''t have access to the code errors.
Fruny
Fruny
VC7.1 does a pretty good job with templates.
What errors do you get, precisely?


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
dathui
dathui
quote:
Original post by Fruny
VC7.1 does a pretty good job with templates.
What errors do you get, precisely?


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan


m, 7.1 is one of the better compilers
reality is only an option
muphicks
muphicks
forgot to login before posting the above reply.
Fruny
Fruny
Try
typedef typename std::list< Connection > clist;
typedef typename std::list< Connection >::iterator clistitr;


Older versions of Visual Studio were more lenient with that kind of things.


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
muphicks
muphicks
/emote hands over a virtual larger for good advice

Well I was on the right line for typename then, just adding it in the wrong place I''m only just starting my journey into using templates.

Anyhow, that resolves the main errors. Still getting others, but their no biggy. Cheers the help everyone, especially for such quick replys

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.