The errors I'm going through is :
Error LNK2019 unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) C:\Users\kaise\source\repos\workshop\workshop\MSVCRTD.lib(exe_main.obj)
Error LNK1120 1 unresolved externals workshop C:\Users\kaise\source\repos\workshop\Debug\workshop.exe
I been working with this errors for 2 weeks
#include<iostream>
#include<cstdio>
#include<fstream>
#include<sstream>
#include<string>
#include<cstdlib>
#include<conio.h>
#include<windows.h>
#include<mysql.h>
#include<tchar.h>
using namespace std;
// Global Variable
int qstate;
MYSQL* conn;
MYSQL_ROW row;
MYSQL_RES* res;
// Global Variable End
class db_response
{
public:
static void ConnectionFunction()
{
conn = mysql_init(0);
if (conn)
{
cout << "Database Connected" << endl;
cout << "Press any key to continue..." << endl;
system("cls");
}
else
cout << "Failed To Connect!" << mysql_errno(conn) << endl;
conn = mysql_real_connect(conn, "localhost", "root", "", "medic", 3306, NULL, 0);
if (conn)
{
cout << "Database Connected To MySql" << conn << endl;
cout << "Press any key to continue..." << endl;
system("cls");
}
else
cout << "Failed To Connect!" << mysql_errno(conn) << endl;
}
};
main()
? If you try to compile and link your exposed code as is, the compiler will notice the lack of it. FYI: Main function – Scheff's Cat