Cpool Part 2

For the second part of the cpool we had to recreate printf. Printf is a function from the standard library of c.

With this function as the name suggests you can print (or display) some output to the terminal.

Setup of Course

In the first part of the cpool we created our own library. Within this library we already had a lot of functions that we could use to our advantage. For example we already had some functions to: print a number, print a character or to find out the length of a string. With these building blocks we could create our own printf.

In the beginning our teachers / peers gave us some good advise. Try to think forward and ahead so you can extend your program. With this advise me and my teammate came up with a setup.

We put all the options inside of an array, and we created all the functions for those options and put their function pointers inside of another array. With these two you could check for the options inside of the format string and can instantly call the function connected to that option.

With this setup we could create functions separately and add it to the program really fast.

Sadly i got very sick this week so we ended up not being able to create the printf we wanted to create. But we did pass.

Thoughts

Again a very good course to learn the fundamentals. With this part of the cpool you are challenged to think ahead because you have to build on it for a while.

https://github.com/tobisphere/epitech_lib


One Response to Cpool Part 2

  1. I like your website big dawg! Stay radical 5ever!