π I Built a Command-Line Calculator in C (v1 & v2) β Now Iβm Working on a GTK GUI Version (v3)
π Hi! Iβm Guntu Jothi Ganesh, a 18-year-old self-taught developer with a growing passion for system-level programming and open-source. I recently completed two versions of a command-line calculator using C, and now I'm building a GUI version using GTK+ 3 on Windows.
This post is a quick showcase of my progress, what Iβve learned, and what Iβm working toward.
π οΈ What I Built
πΉ Version 1: Basic Calculator
- Operates with
+
,-
,*
,/
- Takes two inputs and an operator
- Displays a result with simple output
πΉ Version 2: Improved CLI Calculator
- π Added a loop for continuous calculations
- β Checks for divide-by-zero
- π― Cleaner input/output formatting
- π§Ή Graceful exit
π GitHub: calculator_v2.c
π§© Now Building: Version 3 - GUI Calculator with GTK
Iβm currently working on a graphical calculator using GTK+ β built in C with a nice interface, buttons for input, and result display in a GUI window.
GTK Features in Progress:
- π±οΈ Buttons for digits and operations
- πͺ GTK window with layout design
- π§ Future plan: scientific operations (log, sin, cos, etc.)
- π‘ Learning how to use GTK in MSYS2 on Windows
π GitHub (work-in-progress): gtk_calculator_v3
π What Iβve Learned So Far
- Using
switch-case
, input handling, and loops in C - How to avoid
scanf
pitfalls - Writing readable, maintainable C code
- Compiling GTK projects with
gcc
andpkg-config
- Publishing releases and managing GitHub repos
π― Whatβs Next?
- Polish the GTK interface and layout
- Add scientific calculator functions
- Package it cleanly with README, screenshots, and instructions
- Start contributing to beginner open-source C projects
π£ I'd Love Your Feedback!
If youβre a C dev, GTK user, or just exploring programming, Iβd love to hear your thoughts and suggestions. Feel free to drop a comment or check out my GitHub!
π Connect with Me
- GitHub: logicCrafter320
- Reddit: [u/logicCrafter320](https://www.reddit.com/user/Shoddy_Economy_1646/
Top comments (0)