c + mysql 简单使用例程。 检查一个表是否存在,不存在则创建。 附:MySQL中文参考手册 文件: MySQL中文参考手册.rar 大小: 604KB 下载: 下载 int check_table( char * tablename, char * date) { MYSQL mysql; MYSQL_RES *result = NULL; MYSQL_ROW row; char table_name[128] = {0x0}; char dbquery[1024] = {0x0}; //get table name sprintf( table_name, "%s_%s"...
by 大隐隐于床 - Linux文档专区 - 2009-03-24 18:40:36 阅读(1141) 回复(0)
下面两个都没通过,问题在哪儿呢,请指点
/*输入一个数,如果大于0,输出plus;如果是负数,输出negative;如果正好是0,则输出zero。*/
main()
{
int n;
scanf("%d",&n);
if (n>0)
printf("plus");
else if (n==0);
printf("zero");
else
printf("negetive");
}
------------------------------
/*求二元一次方程的解*/
#include
参考地址: http://msdn.microsoft.com/zh-cn/library/fx6588te.aspx ----------------------using System;using System.collections.Generic;using System.Text;using System.Net;using System.Net.Sockets;using System.Threading; namespace consoleApplicationSS{ // State object for reading client data asynchronously public class StateObject { ...
#include
有一个字串STR[]="123||456||789||543||3453453||..............||765"; 怎么把它以||分割,并存储到数组ARRAY中? 我用strtok()有些问题, #include "stdio.h" #include "string.h" main(){ char str[]="123||345||5676||5656||3||56||676"; int i=0; int arr[50]={0}; arr[0]=atoi(strtok(str,"||")); while(arr[i++]=atoi(strtok(NULL,"||"))) ; retur...
[code]#include
求小于N的自然数为偶数的和! int count = 0; for (int i = 0; i < n; i++) { if (i % 2 == 0) { count = count + i; } } return count; 咋样?
目前很多人看到了c++的猛进势头,想从事c++这个领域,尤其是很多应届毕业生。但是由于他们没有相关社会经验,很多人对c++的应用领域一知半解。 c++的用场Bjarne Stroustrup清晰地回答了这个问题。以下文字摘编自D&E简体中文版《c++语言的设计和演化》。 在以下领域,c++有着根本性的优势:低级系统程序设计、高级系统程序设计、嵌入式程序设计、数值科学计算、通用程序设计以及混合系统设计等等。让我们略微展开描述一下:低级系...
简单的 c void* 泛型: {:3_189:}[code]#include