Programming my first C++ program
- by Jason H.
I have a basic understanding of programming and I currently learning C++. I'm in the beginning phases of building my own CLI program for ubuntu. However, I have hit a few snags and I was wondering if I could get some clarification. The program I am working on is called "sat" and will be available via command line only. I have the main.cpp.
However, my real question is more of a "best practices" for programming/organization. When my program "sat" is invoked I want it to take additional arguments.
Here is an example:
> sat task subtask
I'm not sure if the task should be in its own task.cpp file for better organization or if it should be a function in the main.cpp? If the task should be in its own file how do you accept arguments in the main.cpp file and reference the other file?
Any thoughts on which method is preferred and reference material to backup the reasoning?