Advertisement
Guest User

Untitled

a guest
Nov 25th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include "stdlib.h"
  3. #include <fstream>
  4. #include <string>
  5.  
  6.  
  7. #define CSV_FILE "EnablingTable.csv"
  8. //#define CSV_FILE "test.txt"
  9.  
  10. using namespace std;
  11.  
  12. int main()
  13. {
  14. string line;
  15. ifstream csvFile;
  16. csvFile.open(CSV_FILE);
  17. if (csvFile.is_open())
  18. {
  19. getline(csvFile, line, ',');
  20. cout << line;
  21.  
  22. cout << "\n";
  23. csvFile.close();//close the file
  24. }
  25.  
  26.  
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement