How to structure a C program effectively

后端 未结 7 1429
独厮守ぢ
独厮守ぢ 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:37

    This is quite a normal and sensible practice. But try not to expose the struct layout in header files, so that you have some flexibility in how it's implemented and manage your dependencies better.

    See Opaque pointer for more details.

提交回复
热议问题