fork download
  1. #include<iostream>
  2. #include<fstream>
  3. #include<sstream>
  4. #include<cstring>
  5. #include<stdio.h>
  6. #include<stdlib.h>
  7. #include<string>
  8. #include<vector>
  9. #include<ctype.h>
  10. #include<dirent.h>
  11. #include<map>
  12. #include"coordinate_point.h"
  13. using namespace std;
  14. int main() {
  15. vector<string> files;
  16.  
  17. if (d) {
  18. //we successfully opened the directory
  19. //while there's still something we haven't looked at
  20. while ((dir = readdir(d)) != NULL) {
  21. //get the name of that thing
  22. string filename = dir->d_name;
  23. //filter out what we don't want
  24. if (filename == "." || //filter out current dir
  25. filename == ".." || //filter out parent dir
  26. filename.find(".csv") == string::npos) //here is where you set up the match
  27. continue;
  28.  
  29. //and add what we do want to our files data structure
  30. files.push_back(basepath + "/" + filename);
  31. }
  32. }
  33.  
  34. map<string, int> foo;
  35.  
  36. double fail = 0;
  37.  
  38. for (vector<string>::iterator f = files.begin(); f != files.end(); ++f) {
  39. Extract_Organize process();
  40. cout << "What";
  41. process.transform();
  42. process.create_file();
  43. cout << "Finished!\n";
  44. }
  45. return 0;
  46. }
  47.  
  48.  
  49.  
  50. // my class file
  51. #ifndef COORDINATE_POINT_H
  52. #define COORDINATE_POINT_H
  53. #include<iostream>
  54. #include<fstream>
  55. #include<sstream>
  56. #include<cstring>
  57. #include<stdio.h>
  58. #include<stdlib.h>
  59. #include<string>
  60. #include<vector>
  61. #include<math.h>
  62. #include<ctype.h>
  63. using namespace std;
  64.  
  65. class Extract_Organize
  66. {
  67.  
  68. private: ifstream inputfile;
  69. ofstream outputfile;
  70. //vector<string>::iterator f;
  71. string line, line1, * store_file; // stores data of each line to new file
  72. int count, counter;
  73. long double * accel; //creates allocated dynamic memory to accel arrray
  74. long double * angle; // creates allocated dynmaic meory to angle array
  75. double * time;
  76. long double * velocity;
  77. long double * displacement;
  78. long double * world;
  79. long double a, b, c, x, y, z;
  80. int value, i, j, m;
  81. string item, word, word1, word2, item3;
  82.  
  83.  
  84. public: Extract_Organize();
  85. // Extract_Orgranize();
  86. void transform();
  87. void create_file();
  88. string double_integrate(int, int);
  89. };
  90. #endif
  91.  
  92.  
  93.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty