I've been using C++ quite a lot now, but i have recently moved over to C, and because of my experience with C++ i tend to use C in the same way as I used C++.
e.g:
Expand|Select|Wrap|Line Numbers
- typedef struct SMyStruct
- {
- int A,B,C;
- } MyStruct;
- int myStruct_set_values(MyStruct* s, int a, int b, int c)
- {
- s->A = a;
- s->B = b;
- s->C = c;
- }
Is the above code following conventions?
If not, how would you do it?