Mysql++ and C++ and Windows Programming
I can connect to mysql with with "Connection con" if I'm writing a windows application. But if I try to make a windows console application I cannot use "Connection con" to connect to the mysql database.
Anybody no why?
here's my include:
#include <windows.h>
#include "resource.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <iomanip>
#include <mysql++>
#include <mysql++.h>
#include <conio.h>
#include <string.h>
here's the part I get an error on:
Connection con("my_database");
This is the only part I have as far as connecting for now. I just want to see if I can connect before I can continue. Am I missing something?
The error I get is this:
C:\MySource\sorcehelp\source\source\ctl_one\ctl_on e.cpp(134) : error C2360: initialization of 'con' is skipped by 'case' label
C:\MySource\sorcehelp\source\source\ctl_one\ctl_on e.cpp(130) : see declaration of 'con'
Error executing cl.exe.
-Thanks