How to structure a C program effectively

后端 未结 7 1422
独厮守ぢ
独厮守ぢ 2020-12-24 12:01

Let me first say that I\'ve got a fair amount of experience in both C and C++. However, I\'m starting a new project in C and I\'ve been working in object-oriented languages

7条回答
  •  攒了一身酷
    2020-12-24 12:29

    C has been a low-level language and in the respect it would be very useful to organize your data structures in accordance with your code functions and modules.

    I would suggest that you use typedefs and enumerations wherever you would like to create data objects. Use macros or static functions to initialize, allocate and 'destroy' as required.

提交回复
热议问题