|
vc中,我新建一个win32 console application,选择一个hello world,
直接运行,都有错误!!!如下:
d:\study\vc-sam\rrr\rrr.cpp(4) : fatal error C1083: Cannot open precompiled he
ader file: 'Debug/rrr.pch': No such file or directory
Error executing cl.exe.
除非我先编译下stdafx.cpp才行,晕阿 (问题一)]
#include <stdafx.h>
#include <stdio.h>
#include "c:\Mysql\include\mysql.h" (老说我才头文件mysql.h mysql_com.h
出错,不知道为什么啊)
int main(char **args)
{
MYSQL_RES *result;
MYSQL_ROW row;
MYSQL *connection,mysql;
int state;
mysql_init(&mysql);
connection=mysql_real_connect(&mysql,"localhost","root","111","try",0,0,
0);
if(connection==NULL)
{printf(mysql_error(&mysql));
return 1;
}
state=mysql_query(connection,"select commission,concat(first_name,'
',surname) as name from sales_rep");
if(state!=0)
{printf(mysql_error(connection));
return 1;
}
........ |
|