c-c++
yanhui2012
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
TCPL Excercise 2-9
TCPL Excercise 2-9//a faster version of bitcount //x &= (x-1) deletes the rightmost 1-bit in x int bitcount(unsigned int x) { int b; for (b = 0; x != 0; x &= (x-1)) if (x > 0)原创 2016-04-11 22:29:25 · 708 阅读 · 0 评论 -
关于i++的``side effects''
前些天,碰到一个在考博同学问到c++宏定义中传i++表达式参数的问题,虽然觉得这类问题其实没什么意义,但无奈考博题目要考,只好研究了下。 题目是#include <stdio.h> #include <stdlib.h> #define product(x) ((x)*(x))int main() { int i=3,j,k; j = product(i++); k = p原创 2016-04-12 19:59:13 · 624 阅读 · 0 评论 -
lua快速入门
lua快速入门原创 2017-07-20 15:17:56 · 383 阅读 · 0 评论 -
lua访问mysql数据库
require "luasql.mysql"--initial env = luasql.mysql()--connect db db="testdb" username="test" password="test" ip="127.0.0.1" port="3306" conn = env:connect(db,username,password,ip,port)--set encode conn原创 2017-07-27 15:42:19 · 819 阅读 · 0 评论
分享