tags:

views:

337

answers:

1

I'm try to add multi-interface in ns2 following the paper Adding Multiple Interface Support in NS-2. When changing the file channel.cc, I add code below:

nextX_[this−>index()]
prevX_[this−>index()]

After making this change, I get the following error:

In file included from mac/channel.cc:67:    
mac/wireless-phyExt.h: At global scope:    
mac/wireless-phyExt.h:70: warning: ‘typedef’ was ignored in this declaration    
mac/wireless-phyExt.h:255: warning: ‘typedef’ was ignored in this declaration    
mac/channel.cc:70: error: invalid use of ‘this’ at top level    
mac/channel.cc:70: error: array bound is not an integer constant    
mac/channel.cc:71: error: expected constructor, destructor, or type conversion before ‘prevX_’    
make: *** [mac/channel.o] Error 1

what do these mean? thanks!!!

A: 

I've made some edits to your post so that it makes more sense and added a link to what I think is the article you are referencing. It looks like you are probably adding the suggested line of code in at the wrong place in the file, although the referenced article isn't all that specific about where it is supposed to go, also it does not provide further information about the context of the change or what the whole project is supposed to do, so I was stuck trying to provide you with further information. Also, I would make sure that you do not directly copy and paste the code from the pdf file as it seems to have put in extra spaces between the characters. Finally, a line of code in C++ is required to end with a ';' character, you have not specified whether or not you had done that properly either.

1800 INFORMATION