ChinaUnix.net
相关文章推荐:

c语言传参

C语言 mysql select 查询,怎样传啊? 比如: char *sql="select passwd from user_info where user_id='account'"; account是个变量,查询出来总是 “-1行受到影响”!是数没传进去吗?

by 张美英 - C/C++ - 2013-01-04 10:25:46 阅读(4852) 回复(14)

相关讨论

1.作业:自己编写printf()函数

::::::::::::::
main.c
::::::::::::::
#include "myprintf.c"

void main(void)
{
    char ch='T';
    char name[]="YEP";
    int M = 12345;
    double pi = 314.15926;
    myprintf("\t:::%c:::%d:::%f:::%s \nhello,world!!!\n", ch, M, pi, name);
}
::::::::...

by basketball610 - 移动操作系统 - 2011-12-21 08:41:35 阅读(984) 回复(0)

#!/usr/local/bin/php -q [lu@so uprbtcl]$ php test.php 1 2 3 Hello, 1 2! How are you today? ~~小试成功!! PHP作为Shell脚本时有一个内嵌的数组“$argv”,使用“$argv”数组可以很方便的读取Shell脚本运行时候的数 开心中~ 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/1184/showart_62754.html

by Digico - php文档中心 - 2005-12-21 15:23:30 阅读(1231) 回复(0)

今天有同事问个变函数的问题, #define va_start(list, v) __builtin_va_start(list, v, 1) 看到上边的定义, 可是我查不到 __builtin_va_start 这个函数定义 我想看看具体是怎么实现的

by tianhailong - C/C++ - 2013-06-26 09:24:47 阅读(3198) 回复(5)

不好意思啊 因为没有sqlite的专栏 只好在这里找大家问下了 刚刚开始学习数据库 有个问题好久也没弄出来 不知道为什么 首先创建一个my_table(name varchar(30) PRIMARY KEY, age int,SensorParameter REAL, flag INTEGER); 如果insert into my_table values('haha',56,2.9,5); 这样是没有问题的,可以加到数据库中 但是我现在想用变量代替insert into my_table values();中的数, 例如: char f[2...

by zhanpengfei20 - MySQL - 2012-01-11 00:25:25 阅读(1086) 回复(0)

for((i=1;i<=5;i++)) { echo 1.2.3.4.5 |sed -n '${i}p' } sed: -e expression #1, char 0: unmatched `{' sed: -e expression #1, char 0: unmatched `{' sed: -e expression #1, char 0: unmatched `{' sed: -e expression #1, char 0: unmatched `{' sed: -e expression #1, char 0: unmatched `{'

by top50 - Shell - 2010-12-03 14:30:37 阅读(2015) 回复(2)

test.php 代码:

如果我想把name提交到test2.php并打印出来,test2.php应该怎么写? 谢谢

by sunsansheng - PHP - 2008-03-09 10:59:50 阅读(2783) 回复(2)

#!/bin/sh is_dir(){ for loop in `ls $1` do if [ -d $loop ] then echo d is_dir $loop elif [ -f $loop ] then echo f is_file $loop else echo "不知道什么类型" #为什么传到这里的数就判断不出它的类型? fi done } is_file(){ ls -l $1 } for loop in `ls -l /root` do if [ -d $loop ] then is_dir $loop ...

by meloncao - Shell - 2007-03-09 17:42:52 阅读(1037) 回复(1)

心中的郁闷无以复加,怎么就这么弱呢......大好的时光啊,就这么消逝了....... 以前的一些资料,借郁闷之机发上来备忘吧。 类似printf和sprintf,以及scanf一类的函数数都是可变的。一般也用不到这样的函数,不过在有的情况下还是很有用了。 valist的用法,使用的头文件是stdarg.h 一般的用法是这样(个人理解) va_list args; //声明变量 va_start(args, fmt); //开始解析。args指向...

by oliliango - Linux文档专区 - 2006-11-10 08:21:38 阅读(719) 回复(0)

following are codes: [code] #include #include #include #include #include #include void t_var_argu(char * fmt,...); int main(void) { printf("test variable parameters.\n\n"); char *env; env=getenv("PATH"); if(env==NULL) { t_var_argu("current pid:%d,get the environment failure.\n",getpid()); ...

by mycount - C/C++ - 2006-09-14 09:25:22 阅读(1067) 回复(3)