Saw mention of ReactOS http://www.reactos.com[^] on Slashdot recently. Interesting project although unfortunately I doubt it will succeed.
Mark Basedow
Posts
-
Can there be a free version of Windows ? -
Most Spectacular Mars Photo Yet! -
Code for CMD.exe -
Static arrays and sizeof:):):):):):):):):):):):):):)
-
Static arrays and sizeofWhy can't I use sizeof to find the size of a static data array within a class. It works fine if I use sizeof outside the class. class myclass { public: static char myarray[]; void myfunction() { // VC6 compile error: illegal sizeof operand // GCC 3.2 'sizeof' applied to incomplete type 'char []' // cout << sizeof (myarray); } }; char myclass::myarray[] = "this is a string"; int main(int argc, char* argv[]) { myclass mc; cout << sizeof(mc.myarray); // works //mc.myfunction(); return 0; } another alternative I tried was to make the array const but this only works using GCC on linux; using VC6 I get errors. class myclass2 { public: //VC6 error C2258: illegal pure syntax, must be '= 0' //VC6 error C2252: 'myarray' : pure specifier can only be specified for functions static const char myarray [] = "this is another string"; void myfunction() { cout << sizeof(myarray); } }; int main(int argc, char* argv[]) { myclass2 mc2; cout << sizeof(mc2.myarray); // works mc2.myfunction(); return 0; } Thanks if anyone can help.
-
Black Sabbath. In Latin.Interesting. :eek:
-
Are Access databases (.mdb) deprecated?I,ve downloaded MSDE from Microsoft's website in the past. Can't remember the URL though. To get the visual tools I installed a trial version of SQL Server 7.0 that came with a book.