r/C_Programming • u/juicyk099 • May 22 '26
Code Review & Repo Setup Advice Request: Simple Dynamic Array in C
Hi everyone!
I’ve recently written a simple dynamic array implementation in C as a learning project, and I would highly appreciate some feedback.
Repository: https://github.com/dLRWee/dynamic-array-c
Features & Stack:
- Written in pure C11
- Includes basic operations, logger functionality, and tests
Besides the C code itself, I am specifically looking for advice on how to improve the repository setup.
Could you please review it and share your thoughts on:
- Repository structure: Are the project files organized correctly?
- Build configuration: Is my CMake setup done properly, and should I keep or remove the IDE-specific files (like
.sln,.vcxproj)? - Best practices: What essential files or configurations am I missing to make this repo look professional?
Thank you in advance for your time, tips, and critique!
3
Upvotes
•
u/AutoModerator May 22 '26
Hi /u/juicyk099,
Your submission in r/C_Programming was filtered because it links to a git project.
You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.
While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/pjl1967 May 23 '26
I just posted my own bare-bones dynamic array a few days ago.
For yours, I don't see why the element type should be fixed at
double. I mean, if you specifically want a double-only array, fine, but I would name it something likedouble_array.By hiding the
structin the.cfile, you've eliminated using stack-based arrays (for the array object itself, not the elements), and also all inline functions.I also don't see what logging has got to do with arrays, i.e., why they're in the same repo.
I can't really speak to the repo structure since I'm only really familiar with Autotools-based projects, not CMake-based.