park time can be saved to db now
This commit is contained in:
13
main.cpp
13
main.cpp
@ -1,5 +1,6 @@
|
||||
#include "thirdparty/SQLiteCpp/include/SQLiteCpp/SQLiteCpp.h"
|
||||
#include "headers/data.h"
|
||||
#include "headers/Park_spot.h"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@ -23,12 +24,12 @@ De client clockt in en uit bij een spot.
|
||||
using std::cout;
|
||||
|
||||
int main() {
|
||||
SQLite::Statement test(data::db, "SELECT * FROM Customer WHERE id > 2");
|
||||
while (test.executeStep()){
|
||||
int id = test.getColumn(0);
|
||||
std::string name = test.getColumn(1);
|
||||
cout << id << ", " << name << std::endl;
|
||||
class Customer sagar{"nonsense", Verhicle_type::medium};
|
||||
sagar.update_db();
|
||||
|
||||
}
|
||||
Park_spot p1{1};
|
||||
p1.clock(&sagar);
|
||||
p1.clock(&sagar);
|
||||
sagar.gen_monthly();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user