
Bridging the Decade Gap: My C++ Comeback with Amazon Q Developer CLI Agent
This post talks about a modern way to learn programming languages through AI assistance. I share my journey using Amazon Q Developer CLI Agent to bridge a decade-long gap in my C++ knowledge, demonstrating how AI tools can transform the experience of reconnecting with programming—from generating a simple 'Hello, World!' to building a comprehensive library management system with proper software architecture and design principles.
Kirankumar Chandrashekar
Amazon Employee
Published Mar 14, 2025
Last Modified Mar 19, 2025
After a decade away from C++, I found myself diving back in with the help of Amazon Q Developer CLI Agent, an enhanced CLI agent within the Amazon Q command line interface (CLI). What started as a simple 'Hello, World!' quickly evolved into something more. Within five minutes, I had not only written and compiled a basic program but also created a functional application. As I worked, long-dormant memories of C++ concepts from college began to resurface. Amazon Q Developer CLI Agent wasn't just providing code; it was rekindling forgotten knowledge and streamlining my return to C++.
In this post, I'll share how Amazon Q Developer CLI Agent helped me bridge the decade gap, from generating code to building applications, reigniting my passion for programming along the way.
After setting up the Q Developer CLI, I was ready to begin to chat with the Amazon Q Developer CLI Agent. I started by asking for help to generate a "Hello, World!" program in C++ on a empty project workspace directory. Here's what I asked:
The response I received was both quick and helpful. Here's a series of the interaction:
To refresh my C++ knowledge, I asked Amazon Q Developer CLI Agent to explain the concepts in the "Hello, World!" code. The response was both comprehensive and enlightening:
This detailed explanation served as an excellent refresher, helping me reconnect with C++ concepts I hadn't used in years. It was impressive how Amazon Q Developer CLI Agent could break down even a simple program into its fundamental components, making it easier for me to recall and understand the language's basics.
With this foundation refreshed, I felt ready to tackle more complex C++ challenges.
With the "Hello, World!" code generated, I faced my next hurdle: compiling and executing the program. After such a long hiatus, I realized I had completely forgotten the necessary commands. The syntax for compilation and execution that once felt like second nature had faded from memory.
Thankfully, Amazon Q Developer CLI Agent was there to fill in these gaps. Here's the prompt I used to ask for help:
The Amazon Q Developer CLI Agent came to my rescue with clear, step-by-step instructions. Here's a series of interaction between me and Amazon Q Developer CLI Agent:
The program worked perfectly! This confirms that your C++ development environment is set up correctly and you can now build upon this foundation for more complex C++ projects.
Following these instructions, I was able to successfully compile and run my first C++ program in over a decade. The output was simple, but seeing
"Hello, World!"
appear on my screen felt like a significant victory. It was a powerful reminder of how tools like Amazon Q Developer CLI Agent can bridge the knowledge gaps that form over time, making it easier to return to once-familiar territories in programming.Impressed by Amazon Q Developer CLI Agent's handling of the "Hello, World!" program, I decided to test its capabilities for more substantial C++ development. I prompted:
Amazon Q Developer CLI Agent responded by generating a comprehensive Library Management System application. This wasn't just a simple example, but a functional C++ project:
The application demonstrated several key C++ features:
• Class hierarchy with inheritance
• Memory management using smart pointers
• Exception handling for error scenarios
• Use of STL containers and algorithms
• Memory management using smart pointers
• Exception handling for error scenarios
• Use of STL containers and algorithms
One impressive aspect was how Amazon Q Developer CLI Agent implemented polymorphism through a class hierarchy. Here's a snippet showing the User base class with derived Student and Faculty classes:
What impressed me was Amazon Q Developer CLI Agent's ability to handle the iterative development process. When I compiled the initial code, it identified and fixed compilation errors:
- It detected a missing getInventory() method in the Player class
- It added the missing method and recompiled successfully
- When I requested an interactive version, it created a new implementation without disrupting the original code
Amazon Q Developer CLI Agent didn't just create one version of the application—it developed three different ways to interact with the same core library system:
- Automated Demo: A version that runs through predefined operations to showcase features
- Interactive Command-Line Interface: A menu-driven interface for user interaction
- Programmatic API Usage: An example showing how to use the library as a component in other code
This experience highlighted Amazon Q Developer CLI Agent as a helpful tool for C++ application development. It showed ability in:
- Generating structured C++ code
- Creating organized project layouts
- Implementing common C++ programming practices
- Providing a functional build system
- Offering insights into code functionality
- Adapting to feedback and iteratively improving the code
- Creating multiple interfaces for the same core functionality
While not a replacement for human expertise, Amazon Q Developer CLI Agent demonstrated its potential to assist in various stages of C++ development, from initial coding to compilation and basic testing. It can be a valuable aid for developers working on C++ projects, helping to streamline certain aspects of the development process.
After generating the Library Management System, I decided to try out the interactive version to get a feel for how it works. Running
./interactive_library
presented me with a menu-driven interface that allowed me to interact with the system directly:This hands-on experience with the interactive system gave me a better appreciation for the functionality Amazon Q Developer CLI Agent had built. The system correctly tracked borrowed books, maintained the catalog state, and provided a user-friendly interface—all generated from a simple prompt.
One feature that particularly impressed me was Amazon Q Developer CLI Agent's ability to generate UML diagrams to visualize the structure of the C++ application. When I wanted to better understand the relationships between classes, I asked:
Amazon Q Developer CLI Agent responded with detailed PlantUML code that I could use to generate professional diagrams:
Rendered diagram:

Amazon Q Developer CLI Agent also provided a system architecture diagram showing how the different components interact:
Rendered diagram:

Working with Amazon Q Developer CLI Agent to develop this C++ library system was an enlightening journey that went far beyond simply generating code. It was a comprehensive learning experience that helped me reconnect with C++ concepts I hadn't used in a decade.
What started as a simple "Hello, World!" program quickly evolved into a sophisticated application that demonstrated numerous C++ concepts:
- Basic Syntax Refresher: The initial program reminded me of fundamental C++ syntax and structure.
- Object-Oriented Design: The library system showcased inheritance, polymorphism, and encapsulation.
- Modern C++ Features: Smart pointers, lambda expressions, and STL containers demonstrated contemporary C++ practices.
- Software Architecture: The separation of core functionality from multiple interfaces illustrated proper software design principles.
What impressed me most about Amazon Q Developer CLI Agent wasn't just its ability to generate code, but how it supported the entire development process:
- Compilation Assistance: When I'd forgotten how to compile C++ code, Amazon Q Developer CLI Agent provided the exact commands needed.
- Error Resolution: It identified and fixed compilation errors without disrupting the overall design.
- Interactive Testing: It created multiple ways to interact with the system, allowing for hands-on exploration.
- Visual Understanding: The UML diagrams helped me grasp complex relationships that would be difficult to understand from code alone.
For someone returning to C++ after a long hiatus, the experience highlighted how AI assistance can help bridge knowledge gaps:
- Contextual Explanations: Amazon Q Developer CLI Agent didn't just provide code but explained the concepts behind it.
- Progressive Complexity: It started simple and gradually introduced more advanced concepts.
- Multiple Perspectives: Seeing the same system through different interfaces (automated demo, interactive CLI, API) provided a well-rounded understanding.
- Visual Learning: The combination of code, explanations, and diagrams catered to different learning styles.
This experience demonstrated that tools like Amazon Q Developer CLI Agent can be particularly valuable for developers returning to a language or framework after time away. Rather than spending hours relearning syntax or searching for examples, I was able to:
- Start with a working example
- Understand the underlying concepts
- Explore more complex implementations
- Visualize the architecture and relationships
- Test and interact with the system
All within a single, continuous conversation flow.
My journey back to C++ with Amazon Q Developer CLI Agent showed how AI assistance can transform the experience of reconnecting with a programming language. What might have been a frustrating process of relearning syntax and concepts became an engaging exploration of both basic and advanced C++ features.
While Amazon Q Developer CLI Agent isn't a replacement for deep programming knowledge, it proved to be an invaluable companion for bridging the decade gap in my C++ experience. It helped me not just write code, but understand it—rekindling my appreciation for C++'s power and flexibility along the way.
As I continue to explore C++ development, I now have not only a working library system as a reference but also a deeper understanding of modern C++ practices and design principles. And perhaps most importantly, I've regained the confidence to tackle more complex C++ projects in the future.
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.