I am trying to make an automatic sqlite3 database reader, but the sqlite3 lib seems to have a problem, here’s the code:
char* userName= getenv("USERNAME");
if (!userName)
{
printf("Problem"); // When I run the code it does not print Problem
}
char Dir[1024];
sprintf(Dir, "C:\Users\%s\DesktopDB.db", userName);
sqlite3* Db;
printf("%s", Dir);
sqlite3_open(Dir, &Db);`
I tried redownloading the sqlite3 C/C++ lib, changing the parameters and more but nothing worked, I’m using Code::Blocks.