title: Error when using wait() and fork() in c++
body: <p>I'm trying to use <code>wait()</code> and <code>fork()</code> in my c++ code. but I get the following error in the compilation phase </p>
  
  <pre><code>../test/my_test.cpp: In member function 'void MYClass::myMethod()':
  ../test/my_test.cpp:98: error: no matching function for call to 'wait::wait(int*)'
  /data/backfire/staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.30.1/lib/gcc/i486-openwrt-linux-uclibc/4.1.2/../../../../i486-openwrt-linux-uclibc/sys-include/bits/waitstatus.h:68: note: candidates are: wait::wait()
  /data/backfire/staging_dir/toolchain-i386_gcc-4.1.2_uClibc-0.9.30.1/lib/gcc/i486-openwrt-linux-uclibc/4.1.2/../../../../i486-openwrt-linux-uclibc/sys-include/bits/waitstatus.h:68: note:                 wait::wait(const wait&amp;)
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>void MYClass::myMethod()
  {
      pid_t pid;
      int status;
      if ((pid = fork()) &lt; 0) {
         printf("error fork\n");
         return;
      }
      if (pid == 0) {
          /* cild*/
          ......
      }
      /*parent*/
      while (wait(&amp;status) != pid);
  }
  </code></pre>
  
  <p>How to fix the error?</p>