Help Needed!! Compiling C++ program - errors <p>This is a routine that I believe is for C. I copied it (legally) out a book and am trying to get it to compile and run in visual studio 2008. I would like to keep it as a C++ program. Lots of programming experience in IBM mainframe assembler but none in C++. Your help is greatly appreciated. I think just a couple of simple changes but I have read tutorials and beat on this for hours - getting nowhere. Getting a lot (4) of error C2440 '=' : cannot convert form 'void*' to to 'int*' errors in statements past the reedsolomon function: Thanks so much! Program follows:</p> <pre><code>#include &lt;iostream&gt; using namespace std; int wd[50] = {131,153,175,231,5,184,89,239,149,29,181,153,175,191,153,175,191,159,231,3,127,44,12,164,59,209,104,254,150,45}; int nd = 30, nc=20, i, j, k, *log, *alog, *c, gf=256, pp=301; /* The following is routine which calculates the error correction codewords for a given data codeword string of length "nd", stored as an integer array wd[]. The function ReedSolomon()first generates log and antilog tables for the Galois Field of size "gf" (in the case of ECC 200, 28) with prime modulus "pp" (in the case of ECC 200, 301), then uses them in the function prod(), first to calculate coefficients of the generator polynomial of order "nc" and then to calculate "nc" additional check codewords which are appended to the data in wd[].*/ /* "prod(x,y,log,alog,gf)" returns the product "x" times "y" */ int prod(int x, int y, int *log, int *alog, int gf) {if (!x || !y) return 0; else return alog[(log[x] + log[y]) % (gf-1)]; } /* "ReedSolomon(wd,nd,nc,gf.pp)" takes "nd" data codeword values in wd[] */ /* and adds on "nc" check codewords, all within GF(gf) where "gf" is a */ /* power of 2 and "pp" is the value of its prime modulus polynomial */ void ReedSolomon(int *wd, int nd, int nc, int gf, int pp) {int i, j, k, *log,*alog,*c; /* allocate, then generate the log &amp; antilog arrays: */ log = malloc(sizeof(int) * gf); alog = malloc(sizeof(int) * gf); log[0] = 1-gf; alog[0] = 1; for (i = 1; i &lt; gf; i++) {alog[i] = alog[i-1] * 2; if (alog[i] &gt;= gf) alog[i] ^= pp; log[alog[i]] = i; } /* allocate, then generate the generator polynomial coefficients: */ c = malloc(sizeof(int) * (nc+1)); for (i=1; i&lt;=nc; i++) c[i] = 0; c[0] = 1; for (i=1; i&lt;=nc; i++) {c[i] = c[i-1]; for (j=i-1; j&gt;=1; j--) {c[j] = c[j-1] ^ prod(c[j],alog[i],log,alog,gf); } c[0] = prod(c[0],alog[i],log,alog,gf); } /* clear, then generate "nc" checkwords in the array wd[] : */ for (i=nd; i&lt;=(nd+nc); i++) wd[i] = 0; for (i=0; i&lt;nd; i++) {k = wd[nd] ^ wd[i] ; for (j=0; j&lt;nc; j++) {wd[nd+j] = wd[nd+j+1] ^ prod(k,c[nc-j-1],log, alog,gf); } } free(c); free(alog); free(log); return (); } int main () {reedsolomon (50,30,20,256,301); for (i = 1; i &lt; 51; i++) {cout&lt;&lt; i; "="; wd[i];} cout&lt;&lt;"HEY, you, I'm alive! Oh, and Hello World!\n"; cin.get(); return 1; } </code></pre>