#include <ssqls.h>
sql_create_6(my_ssqls,
1, 6, // The meaning of these values is covered in the user manual
mysqlpp::sql_int, users_id,
mysqlpp::sql_char, name,
mysqlpp::sql_char, method,
mysqlpp::sql_int, mode_id)
....
std::vector<my_ssqls> rows;
for(size_t i = 0; i < rowSize; i++) {
rows[i].users_id = 6788;
.....etc....
}
But my program terminates unexpectedly when it gets to the line where it has to populate the vector rows[i].users_id = 6788;
The vector's size is initially zero. If you want to add and grow the vector one item at a time, you can use push_back. In your case, you already know how many items you want to store, so just resize the vector to be the right size.
1 2 3 4 5 6
std::vector<my_ssqls> rows;
rows.resize(rowSize);
for(size_t i = 0; i < rowSize; ++i) {
rows[i].users_id = 6788;
// .....etc....
}