##是连接符号,连接两个宏eg:#include #define s5(a) supper_##avoid supper_printf(const char* p ){printf("this is supper printf:\n%s\n",p);}int main(){ s5(printf)("...
分类:
其他好文 时间:
2014-07-19 15:15:52
阅读次数:
211
时常,某个程序或软件并没有语法错误,并且你检查它的相关内容也确实没有发现问题。这是因为你用普通文本编辑器软件来查看的时候,有许多字符没有显示出来,但在终端使用cat命令可以很容易地检测出是否存在这些字符。
~首先,我们创建一个简单的文本文件,写入一些特殊字符。打开终端,运行命令:
printf 'testing\012\011\011testing\014\010\012more test...
分类:
系统相关 时间:
2014-07-19 02:16:15
阅读次数:
339
在扩展数据里配置条码数据,使用过的条码不再出现selectBC_BARCODE,BC_UPDATEfromTBARCODEwhereBC_BARCODEnotin(selectBILL_KD_ITEMfromTBILL)andBC_USER_ID=‘$G_USER‘2.在模板里增加选择或者直接输入条码框,实物条码必须要用这个字段BILL_KD_ITEM<tdstyle="BACKGROUND-COL..
分类:
其他好文 时间:
2014-07-19 02:14:15
阅读次数:
219
在C/C++中,宏定义是由define完成的,define中有三个特殊的符号值得我们注意:1. #:在宏展开的时候会将#后面的参数替换成字符串,如: #define p(exp) printf(#exp); 调用p(asdfsadf)的时候会将#exp换成"asdfsadf"2. ##:将前后两个的...
分类:
编程语言 时间:
2014-07-18 21:18:06
阅读次数:
267
请说明下列代码的输出,并解释原因。#includeclass A{public: virtual ~A();};A::~A(){ printf("delete A\n");}class B : public A{public: ~B();};B::~B(){ printf("...
分类:
编程语言 时间:
2014-07-18 20:03:10
阅读次数:
281
题目:应用递归,将输入的二进制数转换为十进制。#include #include void binary_to_decimal(char *s, long dec){ if( *s == '\0' ) printf("Decimal: %ld\n",dec); else ...
分类:
其他好文 时间:
2014-07-18 18:23:50
阅读次数:
217
前面介绍了C语言得发展,原理运行机制下面写两个C程序,下面介绍C源程序得基本部分和书写格式。 【例1-1】输出Hello World!1 #include2 3 int main(void)4 {5 printf("Hello World!%/n");6 return 0;7 }V...
分类:
编程语言 时间:
2014-07-18 15:23:11
阅读次数:
241
see http://phpcj.org/blog/%E4%B8%8D%E5%90%8Clinux%E7%B3%BB%E7%BB%9F%E6%B7%BB%E5%8A%A0%E5%BC%80%E6%9C%BA%E5%90%AF%E5%8A%A8%E7%A8%8B%E5%BA%8F%E7%9A%84%E...
分类:
系统相关 时间:
2014-07-18 14:09:18
阅读次数:
318
shell&python脚本的对比下面是收集系统信息的脚本,对比一下,shell和python的区别。#!/bin/bash
#Asysteminformationgatheringscript
functionuname_func()
{
UNAME="uname-a"
printf"Gatheringsysteminformationwiththe$UNAMEcommand:\n\n"
$UNAME
}
functiondisk_func(..
分类:
其他好文 时间:
2014-07-17 19:38:27
阅读次数:
274
题解:鉴于二进制的思想来划分#include int main(){ int n,d=0;scanf("%d",&n); while(1<<d<=n)d++; printf("%d\n",d);}
分类:
其他好文 时间:
2014-07-17 09:58:59
阅读次数:
197