Pro*C ²¢·¢Êý¾Ý¿âÁ¬½Ó¡¢½¨Á¢Êý¾Ý¿âÁ´
/*
* ¸Ã¹¦ÄÜÖ÷ÒªÊÇÑÝʾ£¬Í¬Ê±Á¬½ÓÁ½¸ö²¢·¢µÄÊý¾Ý¿â
*/
/* °üº¬CÍ·Îļþ */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/* °üº¬SQLCAÍ·Îļþ */
EXEC SQL INCLUDE sqlca;
EXEC SQL INCLUDE sqlda;
int main()
{
EXEC SQL BEGIN DECLARE SECTION;
int money;
char answerbuff[200];
int flag;
EXEC SQL END DECLARE SECTION;
/*
* ¶¨ÒåÊäÈëËÞÖ÷±äÁ¿:½ÓÊÕÓû§Ãû¡¢¿ÚÁîºÍÍøÂç·þÎñÃû
*
*/
char username[10],password[10],server[10], conn_var[20];
strcpy(username,"data_center");
strcpy(password,"data_center");
strcpy(server,"oradf1"); /*ÕâÀïÌîдµÄÊÇÊý¾Ý¿âµÄSID*/
strcpy(conn_var,"llcore");
/* Á¬½Óµ½Ä¬ÈÏÊý¾Ý¿â */
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :server;
if (sqlca.sqlcode==0)
printf("ĬÈÏÁ¬½Ó³É¹¦!\n");
else
/* ÏÔʾÁ¬½Ó´íÎóÏûÏ¢ */
printf("%.*s\n", sqlca.sqlerrm.sqlerrml,
sqlca.sqlerrm.sqlerrmc);
/*¶Ï¿ªÊý¾Ý¿âÁ¬½Ó*/
EXEC SQL COMMIT RELEASE;
printf("¶Ï¿ªÁ¬½Ó!\n");;
/* Á¬½Óµ½·ÇĬÈÏÊý¾Ý¿â */
/*ÕâÀïÓÐÁ½ÖÖÁ¬½Ó·½Ê½£¬Ö»È¡Ò»ÖÖºÍĬÈϵķ½Ê½±£³ÖÒ»Ö´Ç*/
EXEC SQL CONNECT :username IDENTIFIED BY :password AT:conn_var USING :server;
if (sqlca.sqlcode==0)
printf("·ÇĬÈÏÁ¬½Ó³É¹¦!\n");
else
&
Ïà¹ØÎĵµ£º
http://www.ddj.com/cpp/221600722
Q: HOW DO I... put timers with default actions in my C code?
A: Many times, we need to write programs that will only wait a certain specified amount of time for a user to do something. After that time, we need to assume that the user isn't going to do anything and ......
Ö¸ÕëÊÇcºÍc++ÖеÄÄѵãºÍÖØµã¡£ÎÒÖ»¾«Í¨dosϵÄbasic¡£cÓïÑÔµÄÆäËü¸÷ÖÖÌØÐÔ£¬ÔÚbasicÖж¼ÓÐÀàËÆµÄ¶«Î÷¡£Ö»ÓÐÖ¸Õ룬ÊÇbaiscËù²»¾ß±¸µÄ¡£Ö¸ÕëÊÇcµÄÁé»ê¡£
ÎÒ²»ÏëÖØ¸´´ó¶àÊýÊéÉÏ˵µÃºÜÇå³þµÄ¶«Î÷£¬ÎÒÖ»ÊǰÑÎÒ¿´¹ýµÄÊéÖÐ˵µÃ²»Çå³þ»òûÓÐ˵£¬¶øÎÒÓÖ¾õµÃÎÒÀí½âµÃÓеãµÀÀíµÄ¶«Î÷д³öÀ´¡£ÎÒµÄÄ¿µÄÊÇ£º
1¡£Í¨¹ýдÕâЩ¶«Î ......
NandFlashϵÁÐÖ®¶þ£ºS3C2410¶ÁдNand Flash·ÖÎö
2009Äê12ÔÂ09ÈÕ ÐÇÆÚÈý 09:06
Ò»¡¢½á¹¹·ÖÎö
S3C2410´¦ÀíÆ÷¼¯³ÉÁË8λNandFlash¿ØÖÆÆ÷¡£Ä¿Ç°Êг¡Éϳ£¼ûµÄ8λNandFlashÓÐÈýÐǹ«Ë¾µÄk9f1208¡¢k9f1g08¡¢k9f2g08µÈ¡£k9f1208¡¢k9f1g08¡¢k9f2g08µÄÊý¾ÝÒ³´óС·Ö±ðΪ512Byte¡¢2kByte¡¢2kByte¡£ËüÃÇÔÚѰַ·½Ê½ÉÏÓÐÒ»¶¨²îÒ죬ËùÒÔ³ÌÐ ......
#include <stdio.h>
#include <stdlib.h> //use malloc, free
#include <string.h> //use memset
#include <ctype.h> //use isdigit
#define ERROR_ILLEGAL_CHAR 1 //define error illegal character as 1
#define ERROR_NUMBERS_DIF 2 //define error numbers is not the same in diffe ......
#apt-get install gcc (±àÒëÆ÷)
#apt-get install gdb (µ÷ÊÔ)
#apt-get install libc6-dev (¿ª·¢¿â)
Èç¹ûûÓпª·¢¿â£¬gccµÄʱºò¾Í»á´íÎó
gcc h.c
h.c: In function ‘main’:
h.c:1: warning: incompatible implicit declaration of built-in function ‘prin ......