Been playing around with this for hours. Code is based on this google search. Basically, all I want to do is declare a pointer to an array of CARDSTRUCT pointers.
Here is the complete code.
Here is the offending code:
Code:void CardClass::shuffle_deck() { int randnum; int randoms[52]; CARDSTRUCT **nodes; CARDSTRUCT *temp; nodes = new (CARDSTRUCT*)[52]; for(int c=0;c<52;c++) nodes[c] = new (CARDSTRUCT*);
Here are the specific compiler errors:
--------------------Configuration: texcalc - Win32 Debug--------------------
Compiling...
texcalc.cpp
F:\c++ source\texcalc.cpp(151) : error C2143: syntax error : missing ';' before '['
F:\c++ source\texcalc.cpp(155) : error C2440: '=' : cannot convert from 'struct CARDSTRUCT ** ' to 'struct CARDSTRUCT *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
texcalc.exe - 2 error(s), 0 warning(s)
Please help a fellow programmer from being driven to the point of insanity.