Files
c_state_pattern/README.md
sirlilpanda 4aa76fe70c fixed title
2025-08-29 09:28:48 +12:00

607 B

c_state_pattern

a simple example of how to implement the state pattern in c. check main.c for the implementation

how to build and run it

this demo uses a simple build system called nob a header only build system for c projects.

to build run these command in the root of the project:


# bootstraps the build system
> gcc nob.c -o nob

# runs the build system
> ./nob

# runs the program
> ./build/main 

and if you have a differnt complier you want to use that is posix compliant just change the CC macro in the nob.c with your one.