fixed the merge conflict

This commit is contained in:
Becca 2015-09-14 17:03:23 -05:00
commit 2b4590ebf4
3 changed files with 26 additions and 9 deletions

View file

@ -1,12 +1,13 @@
#include "db_engine.h" #include "db_engine.h"
db_engine::db_engine(){ db_engine::db_engine(){
//USELESS COMMENT //
} }
//create a new table in memory //create a new table in memory
db_engine::createCmd(){ //creates a vector
//// void db_engine::createCmd(){
//
} }
//open a txt file, parse SQL script, load data in table //open a txt file, parse SQL script, load data in table
@ -14,9 +15,18 @@ db_engine::createCmd(){
// //
//} //}
//save all the commands to the db text file //should write cmdList to a .txt file
void db_engine::saveCmd(){ void db_engine::saveCmd(){
// std::ofstream dbCmdFile;
dbCmdFile.open("dbCmds.txt", std::ios_base::app);
std::vector<std::string>::iterator it = cmdList.begin();
while (it != cmdList.end()){
dbCmdFile << *it << "\n";
++it;
}
cmdList.clear();
} }
//display the table currently stored in memory //display the table currently stored in memory

View file

@ -1,5 +1,9 @@
#include <fstream>
#include <iostream>
#include <vector>
class db_engine { class db_engine {
//useless comment std::vector<std::string> cmdList;
public: public:
db_engine(); db_engine();

View file

@ -1,5 +1,8 @@
#include <iostream> #include <iostream>
#include "db_engine.h"
int main() { int main() {
std::cout << "Hello nothing!"; db_engine engine;
engine.saveCmd();
std::cout << "succesfully traversed the code!";
} }