[omniORB] Error: expected primary-expression before "const"

Smits, Martin martin.smits at task24.nl
Wed Sep 23 18:44:09 BST 2009


Hi Lakshmeeshk

You are probably correct about your code. The last line in your example is not syntactically correct C or C++. You are not allowed to specify a type in the () when calling a function.

Greetz,
  Martin

From: omniorb-list-bounces at omniorb-support.com [mailto:omniorb-list-bounces at omniorb-support.com] On Behalf Of Lakshmeeshk
Sent: woensdag 23 september 2009 16:04
To: omniorb-list at omniorb-support.com
Subject: [omniORB] Error: expected primary-expression before "const"

Hi,

While compiling "client" program, I am getting below attached error.

client.cpp: In function `int main(int, char**)':
client.cpp:67: error: expected primary-expression before "const"
make: *** [build/client.o] Error 1

In client.cpp program: [ I have attached the lines, where I am suspecting error within this]

 name[0].id = (const char *) "Producer1";
 name[0].kind = (const char *) "";

 obj = ns->resolve(name);

              SysTrace::Producer_var producer = SysTrace::Producer::_narrow(obj.in());

            producer->write(const char* data);

Could anyone help me on this?

Let me know if you need any additional details.

Regards,
Lakshmeesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090923/d06abdcf/attachment.htm


More information about the omniORB-list mailing list