Boubouh Elaanka
Boubouh Elaanka

Reputation: 11

C++ include, using cplusplus {{ }} construct

I have encountered the following code recently and have trouble understanding it:

cplusplus {{
#include "Frame_m.h"`
}}

What's the meaning of cplusplus {{ }}?

Upvotes: 1

Views: 535

Answers (2)

paxdiablo
paxdiablo

Reputation: 881423

OMNet++ contains a language called NED which is used to write the programs. NED is more concentrated on event simulation than general purpose programming.

Now, if you want to use raw C++ types within NED, you surround them with the cplusplus {{}} construct to let NED know that they're of a different form. That's what you're seeing in your example, the construct surrounding an include of a normal C++ header.

See here for an example.

Upvotes: 4

Amit
Amit

Reputation: 13364

The meaning of this is "If you are compiling in C++, include Frame_m.h". However the correct sequence of statement should be..

#ifdef _cplusplus{
#include "Frame_m.h"
}
#endif

this thread can be useful for you,

Upvotes: 0

Related Questions