home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 31,486 of 33,346   
   Francis Glassborow to Agents Marlow   
   Re: When was the default type of int no    
   24 Sep 11 14:42:17   
   
   2408c18d   
   From: francis.glassborow@btinternet.com   
      
   On 23/09/2011 20:08, Agents Marlow wrote:   
   > I am glad that C++ does not assume of type of int if no type is given.   
   > ISTR that in ages past it was allowed but some compilers gave warnings   
   > and now it gives an error.   
   >   
   > I have been doing some C++ tests and came across a question where I   
   > reckon the so-called answer is out of date. You are supposed to say   
   > what is wrong with the code. Here is the code:   
   >   
   > enum TestStatus { not_run = -1, fail, pass };   
   >   
   > int main()   
   > {   
   >    const testsize = 100;   
   >    TestStatus testSuite[testsize];   
   >    return 0;   
   > }   
   >   
   > I said that testsize does not have a type. BrainBench said I was wrong   
   > and that there is nothing wrong with the code. But here's what GCC   
   > says:   
   >   
   > a5.cpp: In function 'int main()':   
   > a5.cpp:6: error: ISO C++ forbids declaration of 'testsize' with no   
   > type   
   >   
   > So it looks like BrainBench is out of date.   
      
   NO! It looks as if Brainbench was NEVER correct. The change was made   
   circa 1994 in the working paper years before there was a Standard.   
      
   This is a good example of why I strongly object to the use of Brainbench   
   to measure anything. If it cannot get simple facts right after so many   
   years how should you judge areas where you do not already confidently   
   know the correct answer.   
      
   IMO Brainbench fails its own test by getting far too many answers wrong.   
   (And they have been told about some of their errors and simply do little   
   about it.   
      
   Unfortunately too many employers believe that Brainbench answers are   
   correct.   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca