C++ sqlite3_prepare_v2 error: Invalid arguments ‘ Candidates are: int sqlite3_prepare_v2(*, const char *, int, * *, const char * *) ‘

  c++, sqlite

I have this piece of code which is not finished and programmed in C++.

The sqlite3_prepare_v2 is not working and the following message appears:

Invalid arguments ‘
Candidates are:
int sqlite3_prepare_v2(*, const char *, int, * *, const char * *)

extern "C" {
#include "sqlite3.h"
}
#include <cstring>
#include <iostream>
using namespace std;

int administrarBonos(sqlite3 *db, float price, int option) {

    sqlite3_stmt *stmt;
    char sql[] = "UPDATE BONO SET PRECIO = ? WHERE ID = ?";

    int result = sqlite3_prepare_v2(db, sql, strlen(sql) + 1, &stmt, NULL);
    return 1;
}

Source: Windows Questions C++

LEAVE A COMMENT