I want to insert values to a mysql table from inside a c++ program such as:
Code:
int main()
// the following is a mysql command
use MyDb;
for(int i=0; i++; i<10)
// The following is a mysql command
INSERT INTO MyTable(Counter)
VALUES(i);
return(0);
can anyone explain me how i can contact my local mysql server (in 'localhost')
and how do i write the above mysql lines in a c++ syntax ?
Tanks !