summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-24 12:32:09 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-04-24 12:33:05 (GMT)
commit2844ef87c6a8f58dd0385da6ba2fe70b8c6d2960 (patch)
treee871daa19ebfd42c8d6b5adc36df99fd71c9a8b8 /Help/guide/tutorial
parent29ea920540f45b54d2e3c000708399d7a40acc4e (diff)
parentc754a3d4b7370ad2fb17f00c40797d7c202550b7 (diff)
downloadCMake-2844ef87c6a8f58dd0385da6ba2fe70b8c6d2960.zip
CMake-2844ef87c6a8f58dd0385da6ba2fe70b8c6d2960.tar.gz
CMake-2844ef87c6a8f58dd0385da6ba2fe70b8c6d2960.tar.bz2
Merge topic 'tutorial-remove-maketable'
c754a3d4b7 Tutorial: Remove MakeTable.cxx from Steps 5 and 6 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4658
Diffstat (limited to 'Help/guide/tutorial')
-rw-r--r--Help/guide/tutorial/Step5/MathFunctions/MakeTable.cxx25
-rw-r--r--Help/guide/tutorial/Step6/MathFunctions/MakeTable.cxx25
2 files changed, 0 insertions, 50 deletions
diff --git a/Help/guide/tutorial/Step5/MathFunctions/MakeTable.cxx b/Help/guide/tutorial/Step5/MathFunctions/MakeTable.cxx
deleted file mode 100644
index ee58556..0000000
--- a/Help/guide/tutorial/Step5/MathFunctions/MakeTable.cxx
+++ /dev/null
@@ -1,25 +0,0 @@
-// A simple program that builds a sqrt table
-#include <cmath>
-#include <fstream>
-#include <iostream>
-
-int main(int argc, char* argv[])
-{
- // make sure we have enough arguments
- if (argc < 2) {
- return 1;
- }
-
- std::ofstream fout(argv[1], std::ios_base::out);
- const bool fileOpen = fout.is_open();
- if (fileOpen) {
- fout << "double sqrtTable[] = {" << std::endl;
- for (int i = 0; i < 10; ++i) {
- fout << sqrt(static_cast<double>(i)) << "," << std::endl;
- }
- // close the table with a zero
- fout << "0};" << std::endl;
- fout.close();
- }
- return fileOpen ? 0 : 1; // return 0 if wrote the file
-}
diff --git a/Help/guide/tutorial/Step6/MathFunctions/MakeTable.cxx b/Help/guide/tutorial/Step6/MathFunctions/MakeTable.cxx
deleted file mode 100644
index ee58556..0000000
--- a/Help/guide/tutorial/Step6/MathFunctions/MakeTable.cxx
+++ /dev/null
@@ -1,25 +0,0 @@
-// A simple program that builds a sqrt table
-#include <cmath>
-#include <fstream>
-#include <iostream>
-
-int main(int argc, char* argv[])
-{
- // make sure we have enough arguments
- if (argc < 2) {
- return 1;
- }
-
- std::ofstream fout(argv[1], std::ios_base::out);
- const bool fileOpen = fout.is_open();
- if (fileOpen) {
- fout << "double sqrtTable[] = {" << std::endl;
- for (int i = 0; i < 10; ++i) {
- fout << sqrt(static_cast<double>(i)) << "," << std::endl;
- }
- // close the table with a zero
- fout << "0};" << std::endl;
- fout.close();
- }
- return fileOpen ? 0 : 1; // return 0 if wrote the file
-}