diff options
author | Brad King <brad.king@kitware.com> | 2022-08-31 13:45:16 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-08-31 13:45:32 (GMT) |
commit | 42a4fb11412e71990a0080cacfa7389b6d109e11 (patch) | |
tree | d85dba414c2cc6769fa784c27e9c33490e96bb2c /Help/guide/tutorial/Step2/tutorial.cxx | |
parent | 6a7c60f3a384af2d1df5fbc0b4f9db092cda6f26 (diff) | |
parent | 80f5d288135fc4f571b6f005de36890e9b46476a (diff) | |
download | CMake-42a4fb11412e71990a0080cacfa7389b6d109e11.zip CMake-42a4fb11412e71990a0080cacfa7389b6d109e11.tar.gz CMake-42a4fb11412e71990a0080cacfa7389b6d109e11.tar.bz2 |
Merge topic 'tutorial_step2_update'
80f5d28813 Tutorial: Update step 2 style
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7577
Diffstat (limited to 'Help/guide/tutorial/Step2/tutorial.cxx')
-rw-r--r-- | Help/guide/tutorial/Step2/tutorial.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Help/guide/tutorial/Step2/tutorial.cxx b/Help/guide/tutorial/Step2/tutorial.cxx index 53b0810..f83aa7e 100644 --- a/Help/guide/tutorial/Step2/tutorial.cxx +++ b/Help/guide/tutorial/Step2/tutorial.cxx @@ -5,6 +5,10 @@ #include "TutorialConfig.h" +// TODO 11: Only include MathFunctions if MY_MATH is defined + +// TODO 5: Include MathFunctions.h + int main(int argc, char* argv[]) { if (argc < 2) { @@ -18,6 +22,10 @@ int main(int argc, char* argv[]) // convert input to double const double inputValue = std::stod(argv[1]); + // TODO 12: Use mysqrt if MY_MATH is defined and sqrt otherwise + + // TODO 6: Replace sqrt with mysqrt + // calculate square root const double outputValue = sqrt(inputValue); std::cout << "The square root of " << inputValue << " is " << outputValue |