Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
188 views

How should I provide generic typing and allocation for a collection library in C?

I am in the process of implementing a persistent collection in C, specifically, an immutable hash trie. In order to increase acceptance and reusability, I have identified the following key areas that ...
ammut's user avatar
  • 159
0 votes
3 answers
1k views

Definition of Generic function

1) Below is a python function summation, that can perform sum of cubes/squares/.., similar operations. def identity(k): return k def cube(k): return pow(k, 3) def square(k): return ...
overexchange's user avatar
  • 2,315
5 votes
1 answer
2k views

Using macros to implement a generic vector (dynamic array) in C. Is this a good idea?

So far I have only done personal projects at home. I hope to get involved in some open source project some time next year. The languages I that have been using the most are C and C++. I have used both ...
wefwefa3's user avatar
  • 1,007
7 votes
2 answers
4k views

Writing generic code when your target is a C compiler

I need to write some algorithms for a PIC micro controller. AFAIK, the official tools support either assembler or a subset of C. My goal is to write the algorithms in a generic and reusable way ...
enobayram's user avatar
  • 181