Okay, i've got a good collection of jokes in sql format and i can convert it to csv.
Now i have a problem-
How do i make c++ load a joke from the database
the columns in the database are id, category id, title, text, status(whether this category is enabled or disabled) ,rating and adult.
now what i want to do is create an array of a struct jokes from this database.
now the database has over 15000 jokes so can someone please tell me how to convert the csv file or sql dump into a header file that i can use to load the array of jokes from(ie a file that already has the jokes stored as c++ variables so i can just load it)
it is a big collection and i don't know how to extract the data because in the csv some of the entries are in quotes and some aren't.
and in the sql it is in the form of
Code: Select all
INSERT INTO jokes VALUES(1,1,'.......
.
if anyone knows of another file format from which i can easily extract the data into a format i can read from c++ and use it in my program, please tell me.
Thank you very much and sorry for my noobinosity