You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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) andargv
(an array of strings containing the arguments) to get whatever is passed in at the command line.The text was updated successfully, but these errors were encountered: