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 33,248 of 33,346   
   Alf P. Steinbach to Barry Schwarz   
   Re: Segmantation Fault when doing matrix   
   27 Oct 13 06:42:08   
   
   From: alf.p.steinbach+usenet@googlemail.com   
      
   On 27.10.2013 05:45, Barry Schwarz wrote:   
   >   
   > If you would indent your code consistently, it would be much easier   
   > to read and the problem would have been obvious.   
      
   That's good advice.   
      
   Additionally one might mention that one way to indent code   
   consistently is to use a pretty-printing tool such as AStyle, which is   
   a free one.   
      
   >> #include    
   >> #include    
   >> #include    
   >   
   > If you are going to code in C++, you should use the C++ headers, such   
   > as cstdio and cstdlib.   
      
   That's ungood advice. More can go wrong that way than by using the *.h   
   headers, plus it's more verbose, plus it's incompatible with   
   supporting C interfaces. Almost no (if any) compiler was compliant   
   with C++98/C++03 with regard to the purpose of the cxxx headers, and   
   so with C++11 the standard was fixed to allow the universal practice.   
      
   It's prudent to adopt conventions that do not needlessly offer extra   
   possibilities for things to go wrong, especially when there is a cost,   
   such as verbosity, and when there is a 13 years demonstration that the   
   convention is attempting to leverage a feature that few if any   
   compiler implements, and that now with C++11 has been abandoned.   
      
   In short, don't.   
      
      
   Cheers & hth.,   
      
   - Alf   
      
      
   --   
         [ 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