Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Maarten Brock
05/26/12 03:57
  05/26/12 03:57

Read: 500 times
The Netherlands

#187534 - C++ and style
Responding to: Stefan Kanev's previous message
Stefan Kanev said:
#include <cstdlib>
#include <cstdio>

There is no Dev-C, only Dev-C++. And the above code shows that you're using C++. Then why did you start the thread with asking about C ? The two are related, but certainly not the same.

Stefan Kanev said:
void testaccess(void)
 {char submenu,fieldnum,fieldscount,fieldtype;


 for (submenu=0;submenu<SUBMENUScount;submenu++)
  {printf("Submenu %d ---------n",submenu);

Please do not put code behind the opening curly brace like that. It totally ruins the visible start and end of a block. Whitespace really is not expensive, you know.

List of 15 messages in thread
const strings in C      Stefan KAnev      05/23/12 23:27      
   Does not compile      Maarten Brock      05/24/12 02:05      
      my question was      Stefan KAnev      05/24/12 04:21      
         Common to play with #define EXTERN      Per Westermark      05/24/12 05:41      
            Common doesn't mean recommended      Oliver Sedlacek      05/25/12 09:43      
               well I recommend it      Erik Malund      05/25/12 10:13      
               No - not hard to maintain at all      Per Westermark      05/25/12 12:44      
   C strings      Per Westermark      05/24/12 03:00      
   Whats wrong with a header file?        Oliver Sedlacek      05/24/12 10:08      
      nothing wrong, double work      Stefan KAnev      05/24/12 11:04      
         It works, and has advantages      Oliver Sedlacek      05/25/12 07:06      
         I got in a total absolute magnificent mess      Erik Malund      05/25/12 07:58      
   thanks to everyone, and next question is      Stefan KAnev      05/25/12 14:46      
      about (tables of) pointers to const strings      Stefan KAnev      05/25/12 14:47      
         C++ and style      Maarten Brock      05/26/12 03:57      

Back to Subject List