title: "'void*' is not a pointer-to-object type" in code with no void*'s?
body: <p>I have a problem in my code. In <strong>Xcode</strong> or using the <strong>C++11</strong> compiler, this code works well. However, when I am submitting this code to an Online Judge, the verdict shows <strong>"Compile Error"</strong>. I think they use the <strong>C++4.7.1</strong> compiler, which when I tried to compile it (using Ideone), it says: </p>
  
  <pre><code>prog.cpp: In function 'void printArray(int)':
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  prog.cpp:27: error: 'void*' is not a pointer-to-object type
  </code></pre>
  
  <p>This makes no sense because there are no <code>void*</code>'s anywhere in this program.</p>
  
  <p>I don't have any inkling what to change though. It would be great if you guys help me to solve this. Below is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;math.h&gt;
  #include &lt;cmath&gt;
  #include &lt;tgmath.h&gt;
  
  int array[10] = {1,2,3,4,5,6,7,8,9};
  int initial = 1;
  int tmp;
  int total[500];
  
  using namespace std;
  
  void swap(int x, int y){
      int temp = array[x];
      array[x]=array[y];
      array[y]=temp;
  
      return;
  }
  
  void printArray(int size){
  
      int i;
      for (i=0;i&lt;size;i++){
          //cout&lt;&lt;array[i]&lt;&lt;" ";
          tmp= array[i];
          tmp= (tmp* (pow(10.0,(size-i-1))));  // &lt;--- Error here
          total[initial]=total[initial]+ tmp;
      }
      initial++;
      tmp=0;
      //cout&lt;&lt;endl;
  }
  
  void permute(int k,int size){
      int i;
      if (k==0) printArray(size);
      else{
          for (i=k-1;i&gt;=0;i--){
              swap(i,k-1);
              permute(k-1,size);
              swap(i,k-1);
          }
      }
  
      return;
  }
  
  void quickSort(int arr[], int left, int right) {
      int i = left, j = right;
      int tmp;
      int pivot = arr[(left + right) / 2];
  
      while (i &lt;= j) {
          while (arr[i] &lt; pivot)
              i++;
          while (arr[j] &gt; pivot)
              j--;
          if (i &lt;= j) {
              tmp = arr[i];
              arr[i] = arr[j];
              arr[j] = tmp;
              i++;
              j--;
          }
      };
  
      if (left &lt; j)
          quickSort(arr, left, j);
      if (i &lt; right)
          quickSort(arr, i, right);
  }
  
  int main(){
      int countertest;
      cin&gt;&gt;countertest;
      int ak, asize;
  
      for(int a= 0; a&lt;countertest; a++){
  
          initial = 1;
          std::fill(total, total+500, 0);
          cin&gt;&gt;asize&gt;&gt;ak;
          permute(asize,asize);
  
          quickSort(total, 1, initial-1);
  
          int arraydex [10000], temp = total[ak];
          for(int z = asize; z&gt;=0; z--){
              arraydex[z] = temp % 10;
              temp /= 10;
          }
  
          for(int bc = 1; bc&lt;=asize; bc++){
              cout&lt;&lt;arraydex[bc]&lt;&lt;" ";
          }
          cout&lt;&lt;endl;
      }
  
      return 0;
  }
  </code></pre>