# Odd Syntax Errors

This topic is 4814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

##### Share on other sites
It would help if you actually typed something.

##### Share on other sites
I'm really sorry, I seem to time out every time I post.. Terribly sorry, I don't plan to be posting again :(

##### Share on other sites
If you want, send an e-mail to ekimgram@gmail.com with your errors.

##### Share on other sites
If you need to write something long, write it up in Notepad (or equivalent) first, then hit reply and paste the whole thing into the text box.

##### Share on other sites
Quote:
 If you need to write something long, write it up in Notepad (or equivalent) first, then hit reply and paste the whole thing into the text box.

Luckily, that's what I've been doing lately. Of course, it just times out... But hey, Ekim_Gram, thanks for the offer, I'll send it over soon!

##### Share on other sites
Wow, I timed out too trying to post what he wanted to. If anybody would like to help, PM me and I'll give you the post.

[Edited by - Ekim_Gram on October 10, 2004 11:14:24 AM]

##### Share on other sites
Ahh, you see, that is why I like .php better then .asp, as for me at least, I have never had problems with it :) Thanks for trying anyway!

##### Share on other sites
Okay folks, since I am utterly unable to post what I intended to (and so are others, it appears), I have taken the liberty to post it to another forum, so I can provide the link, and allow you all to see my problem, without having to use email :) Again, my thanks to anyone who goes out of their way to help a poor, misguided programmer :)

Thanks!

##### Share on other sites
First error i can see is the

Node * Insert(TILE * theData)=0;

line of code in class Node.

You missed the virtual keyword.

Try correcting that and see what happens.

virtual Node * Insert(TILE * theData)=0;

##### Share on other sites
So if the declaration in the 'parent' class, in this case 'Node', is virtual, then all subsequent declarations in 'child' classes have to be declared virtual as well? Hmm, can't recall it said that in the book, although knowing me, I probably just missed it :p I'll give that a try.

[EDIT] And vice versa, with that 'parent-child' bit?

[EDIT x2]Okay, added it in, still nothing doing. If anything, I got more syntax errors.. Very odd, this is...

##### Share on other sites
Quote:
 Original post by SirLuthorSo if the declaration in the 'parent' class, in this case 'Node', is virtual, then all subsequent declarations in 'child' classes have to be declared virtual as well? Hmm, can't recall it said that in the book, although knowing me, I probably just missed it :p I'll give that a try.[EDIT] And vice versa, with that 'parent-child' bit?

All functions with the same name and parameters as a function that is declared as virtual in a base class are implicitly virtual. This has little to do with the problem in hand though, as you arn't declaring the function as being virtual in the Node base class, you missed the virtual keyword.

##### Share on other sites
Quote:
 Original post by SirLuthor[EDIT x2]Okay, added it in, still nothing doing. If anything, I got more syntax errors.. Very odd, this is...

whats in tileclass.hpp?

##### Share on other sites
It contains a tile class, i.e 'class tileClass', which I shall, for the record, show here, just in case it may aid someone in aiding me :)

#ifndef TileCLASS_HPP#define TileCLASS_HPPclass tileClass{    public:        tileClass();        ~tileClass();        int getTileID() const;        void setTileID(int tempID);        int getDirOpen(int tempDir);        int getGold() const;        void removeGold();    private:        int tileID;        bool dirOpenUp;        bool dirOpenRight;        bool dirOpenDown;        bool dirOpenLeft;        bool gold;};#endif

##### Share on other sites
//***   Abstract Data Type: Node || Base class for other node types   ***\\

That last backslash probably isn't followed by a space and is absorbing the newline character as a control character, resulting in the following line also being commented out. Don't use a backslash at the end of the comment.

##### Share on other sites
Quote:
 Original post by joanusdmentiaTake a look at your comments...//*** Abstract Data Type: Node || Base class for other node types ***\\That last backslash probably isn't followed by a space and is absorbing the newline character as a control character, resulting in the following line also being commented out. Don't use a backslash at the end of the comment.

Now there's onc I didn't know! Thanks a lot, I never would have guessed in a million years that that was a bad thing, even if doesn't turn out ot be causing my problem :)

[EDIT] Dude! It worked! A thousand thanks, I never would have guessed that was the problem! Consider yourself rated :) And, my thanks to all who contributed to solving of my problem! I don't know where I would be without this great community!

##### Share on other sites

This topic is 4814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.