1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#include "stdafx.h"
#include "EventClass.h"
#include <string>
#include <fstream>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int main()
{
ifstream SQLPull;
int numberOfEvent, totalEvents = 0;
string number, title1, entity1, area1, tooltype, date1;
vector<string> QEFNumbers;
vector<string> QEFtitles;
vector<string> QEFentity;
vector<string> QEFtoolset;
vector<string> QEFdate;
numberOfEvent = 0;
if (SQLPull)
{
while (!SQLPull.eof())
{
getline(SQLPull, number, ',');
cout << number << endl; //to see if it was working. Got nothing.
getline(SQLPull, title1, ',');
getline(SQLPull, entity1, ',');
getline(SQLPull, area1, ',');
getline(SQLPull, tooltype, ',');
getline(SQLPull, date1, ',');
//QEFNumbers[numberOfEvent] = number;
//QEFtitles[numberOfEvent] = title1;
//QEFtoolset[numberOfEvent] = tooltype;
//QEFdate[numberOfEvent] = date1;
numberOfEvent++;
}
}
else
{
cout << "Error opening file." << endl;
}
SQLPull.close();
return 0;
}
| |