Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: More Unix-like #1

Open
NoraCodes opened this issue Dec 17, 2016 · 0 comments
Open

Suggestion: More Unix-like #1

NoraCodes opened this issue Dec 17, 2016 · 0 comments

Comments

@NoraCodes
Copy link

I would suggest that one major improvement to this tool would be to make it more UNIX-ish, i.e., take arguments from the command line rather than interactively. Since all four functions take three values, this could be relatively simple, with an invocation like:

./PerfectGasLaw function value1 value2 value3

Since you've already modularized your code (good job!) all you'd have to do is change the getValuesForX functions and the main function. Here's a hint to get you started: if you declare main like this:

int main(int argc, char** argv)

you can use argc (the number of arguments) and argv (an array of strings containing the arguments) to get whatever is passed in at the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant