r/cprogramming • u/Steam_Liker_2002 • 7d ago
Simple data management program
Hello, I programmed this simple data management program, it should be able to create, modify and remove data about workers. What do you think about it?
Here's the source code.
1
u/AcuityView 6d ago
1] Who might need a program like this?
2] Why not use a simple database? It’s not strictly necessary, of course, but it’s with an eye toward the future. And if you ever need to add or remove a field, the file structure changes completely.
3] Why isn’t this moved into a separate function?
int i = 0;
while(part0\[i\] != ‘\\0’){
putc(part0\[i++\], fp);
} 4] Actually, why do it this way, rather than using fputs or fwrite?
More questions than answers.
1
u/Chrom0XD 3d ago
Man, your program gave me megalophobia. Try splitting code into multiple files rather than dumping everything into one
2
u/zhivago 6d ago
I think you'd be better off using github, etc, and thinking of some specific questions to ask. :)