I am a dragon developer. I am studying the C programming language. I have covered most basic things and gradually Moving towards the advanced use of C I have the following questions.
-
Based on C,
#ifndef _obj_h , we use underscores E.G. If my header file is
obj.h , then I will use it as the
_obj_h . What if I have a header file named
my_test_header.h ? Will I use it as the
_my_test_header_h ? Naming Convention Here's what?
Is the CMT allowed for example only in the initial time of the time (int i = 0 ....) ? My compiler throws an error but in many books it is defined as legal.
Please share any good resources for advanced use of C programming, which discusses development strategies, language usage.
- The primary and most important naming convention is that < Strong> Do not use many consecutive examples of single punctuation! !!!!!!!
In addition to that usual annoyance: The initial identifier with underscores is reserved for implementation. Do not use them Also, preprocessor macros are usually written in
ALL_CAPS so they can be easily separated from common identifiers, tasks, etc. Write your included guards like this:
#ifndef MYHEADER_H #define MYHEADER_H / * ... * / #endif
C99 only Allows time to start such as for example (int i = 0 ....)? My compiler throws an error, but in many books it is defined as legal.
Then ask your compiler to use C99. Maybe try
-std = c99 , works for GCC and chime (but it should not be necessary for
clang , it is missed in C99 mode) .
No.
No comments:
Post a Comment