Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

cÓïÑÔÈçºÎÁ¬½ÓMYSQL£¿

´ó¼ÒºÃ:
ÎÒÊǸãCµÄ, ÏÖÔÚÏëÓÃC Á¬½ÓMYSQL,µ«ÊÇÔõôҲÁ¬½Ó²»ÁË,ÎҵĴúÂëÈçÏÂ:
#include <stdio.h>
#include "C:\Program Files\MySQL\MySQL Server 5.0\include\mysql.h"


int main()
{

MYSQL* mysql_a;
mysql_a = mysql_init(NULL);

if(mysql_a == NULL)
{
printf("init mysql failed\n");
return ER_BAD_DB_ERROR;
}

if (mysql_real_connect(mysql_a, "localhost", "root" , "123456", "lqiuiw",0, NULL, 0) == NULL)
{
printf("Failed to connect to database: Error: %u(%s)\n", mysql_errno(mysql),mysql_error(mysql));

mysql_close(mysql);
mysql = NULL;
return ER_BAD_DB_ERROR;
}
return 0;
}

³öÏֵĴíÎóÊÇ:
--------------------Configuration: sdfs - Win32 Debug--------------------
Compiling...
sdfs.c
c:\program files\mysql\mysql server 5.0\


Ïà¹ØÎÊ´ð£º

C ³ÌÐòÎÊÌâ (¶þ) - C/C++ / CÓïÑÔ

ÎÊһϣº
#include <stdio.h>
int main()
{
  char x, y, z;
  int i;
  int a[16];
  for(i=0; i<=16; i++)
  {
  a[i] = 0;
  ......

ÄÜÓÃC/C++¼òµ¥ÊµÏÖÎå×ÓÆå³ÌÐòÂð?

×î½üͻȻÏë×Ô¼ºÀ´ÊµÏÖÒ»¸öÎå×ÓÆå³ÌÐò,µ«²»ÖªµÀÔõô¿ªÊ¼,×Ô¼ºÒ²Ã»Ñ§»­Í¼Ðκ¯Êý,ÄÜÔÚ¿ØÖÆÌ¨ÏÂÖ±½ÓдÂð>>>?????
¿ØÖÆÌ¨£¿±ÈͼÐνçÃæ¸üÂé·³¡£
http://search.download.csdn.net/search/%E4%BA%94%E5%AD%90% ......

ÇóÕ䯷£¬´ÓÍ·ÎļþÖн«C½á¹¹½âÎö²¢Êä³ö³öÀ´¡£

±³¾°£º
£­£­£­£­£­£­£­£­
Í·Îļþdb_method.h¾­¹ýÃÀ»¯ºó´æÔÚÏÂÃæ¼¸Öֽṹ¶¨ÒåÀàÐÍ
typedef struct
{
BYTE id;
BYTE idAsync;
DM_T dmInfo;
CHAR tbName[MAX_TBNAME_LEN];
} REC ......

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

MYSQL°²×°Ê§°Ü

ÎÒÒÔǰ°²×°ÁËÒ»´Î£¬ºóÀ´Ð¶ÔØÁË£¬ÏÖÔÚÔÙ°²×°µÄʱºò£¬Ìáʾ´íÎó£ºError 1305.Error reading from file C:DOCUME~1\LOCALS~1\Temp\mysql_server.msi.Verify that the file exists and that you can access it. 
¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ