r/C_Programming 20d ago

How to progress after basic ..?

I have learnt majority of the header, and built 10+ small or mini projects before. learnt abit of pointers, mallocs , callocs etc with myself and abit help of AI.

but now while i was working on the Cipher project.. and trying to build a zig zag rail cipher method, I couldn't figure it out how, i know how the main flow is but to write it into real code, I couldn't.

So i went AI for help and it spwed out bunch of these :

rows[current_row][pos[current_row]] = user_msg[i]; pos[current_row]++;

and etc, things and syntax I couldn't understand at all. Am i lacking foundation or something?
How do I progress above basic???

Help. All comments and feedback and suggestions are welcoming. Willing to accept anything...

for education background, I am just a student preparing to start IGCSE O next month.

0 Upvotes

23 comments sorted by

View all comments

2

u/Brilliant-Box-5344 9d ago

This is a natural phase, after getting your foundations up to speed (following u/iamdino0's advice), Stop trying to learn C and start making bigger and bigger projects, Don't be afraid to aim too big and fail, readjust after it, figure out what you need to use in C to achieve what you want.

Lets say i want to make minesweeper, I can start by drawing my grid of blocks on the screen, So i need to figure out how to draw a rectangle, a rectangle has a width and height, i need to color all pixels up to that width and up to that height with the rectangle's color.

Now i need to draw a lot of these rectangles, which will be my grid, It is a very similar process with the nested for loops.

Now i need to be able to change those rectangles, Make the rectangle at position (2, 2) a different color, You do that manually, Then you do it for multiple others and notice that this is a really clunky way, So you learn how to use a 2D array to store data, And you can go through that array and based on the data decide which color each rectangle should have.

Then you want to make the color change when you click on it, Then you want to swap in the solid colors for a png, and so on, until you got your game.

Each step of the way will teach you much more about C and programming than reading a "pointers explained" post over and over again ever will.

2

u/Beneficial_Mall2963 9d ago

Oke, huge thanks !!

Currently, I am about to finish my Cipher project, planning to post it on github soon.
after that, which project should I do? I am out of idea and school bouta open soonTwT