FINALLY FIXED SEGMENTATION PROBLEMS
For context i was building the compressor and i had segmentation problems
What is a segmentation problem?
A segmentation problem is when you try and access memory your don’t have access.
What was the problems?
- First the allocation, i didnt allocate for the array of pointers to my struct.
- Didnt check for NULL, so my arrays have 256 nodes (for all of the ASCII values) and i was trying to access values that just didnt existed.
How did i fix it?
I used AI to debug my code, I didnt directly asked for the awnsers, i asked it to help me without giving out awnsers. AI was very useful since i mad alot of small mistakes since i didnt program in C for a long time.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.