title: Adding C++ code in C program - expected ‘,’ or ‘...’ before ‘this’
body: <p>I am building a C program with no problem on CentOS using provided Makefiles in its distro package. However I need to modify source files and I need to use iqxmlrpc and boost libraries for that purpose. I have changed Makefiles respectively but when I want to build the package I get following error:</p>
  
  <blockquote>
    <p>../src/libiqxmlrpc/libiqxmlrpc/except.h:9:21: error: stdexcept: No such file or directory
    ../src/libiqxmlrpc/libiqxmlrpc/except.h:10:18: error: string: No such file or directory
    In file included from ../src/libiqxmlrpc/libiqxmlrpc/libiqxmlrpc.h:17,
                     from redir.c:2617:
    ../src/libiqxmlrpc/libiqxmlrpc/except.h:14: error: expected '=', ',', ';', 'asm' or '<strong>attribute</strong>' before 'iqxmlrpc'
    <br>
    ... followed by many other errors ...</p>
  </blockquote>
  
  <p>I believe above error is because iqxmlpc is written in c++ and gcc is treating it as C so I tried followings:<br>
  1) Use g++<br>
  2) Use gcc -x c++
  <br>
  Doing above, error changes to a lot of following in many header files:</p>
  
  <blockquote>
    <p>error: expected ‘,’ or ‘...’ before ‘this’</p>
  </blockquote>
  
  <p>All the lines that compiler is complaining somehow have this or delete keywords as parameter. See below:</p>
  
  <blockquote>
    <p>int net_route(struct in_addr *dst, int delete);<br>
    or<br>
    extern int gad_new(struct gad_t **this)</p>
  </blockquote>
  
  <p>Do you have any idea how can I fix this? Frankly, I have no idea what using 'this' or 'delete' mean as parameters. Are these only parameter names that gcc ignores the rule that we can not use keywords?</p>
  
  <p>------------------------------<br>
  BTW, original programmer have used nested functions all across his code which were compiled fine using gcc. when I switch to g++, compiler complains about function-definition not being allowed in another function. Is there any way I can tell g++ to ignore this error?</p>