summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step2/tutorial.cxx
diff options
context:
space:
mode:
authorMarkus Ferrell <markus.ferrell@kitware.com>2022-07-25 16:19:32 (GMT)
committerMarkus Ferrell <markus.ferrell@kitware.com>2022-08-29 19:43:53 (GMT)
commit80f5d288135fc4f571b6f005de36890e9b46476a (patch)
tree101b157ee16257ef9569a7736f790b4d279e4daf /Help/guide/tutorial/Step2/tutorial.cxx
parent5b949bbb9114379120c29134b5effd77e39dd134 (diff)
downloadCMake-80f5d288135fc4f571b6f005de36890e9b46476a.zip
CMake-80f5d288135fc4f571b6f005de36890e9b46476a.tar.gz
CMake-80f5d288135fc4f571b6f005de36890e9b46476a.tar.bz2
Tutorial: Update step 2 style
Diffstat (limited to 'Help/guide/tutorial/Step2/tutorial.cxx')
-rw-r--r--Help/guide/tutorial/Step2/tutorial.cxx8
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