码迷,mamicode.com
首页 >  
搜索关键字:printf bc    ( 16964个结果
读取中文的标准C API
这个是在Linux下遇到的,以前从来都不需要支持中文,最近项目需要。 FILE *fp=NULL; fgets(buf, sizeof buf, fp); printf ("buf=%s\n", buf); 成功,就这样就满足我的需求了。 之前的弯路是fread()来读取,这个就太麻烦了,所以换了算法。...
分类:Windows程序   时间:2014-06-05 11:53:27    阅读次数:342
虚析构函数的作用
1class ITest 2{ 3public: 4virtual void Test() = 0; 5 6}; 7 8class CTest : public ITest 9{ 10 public: 11CTest(){ printf("constructor.n"); }; 12~CTest()...
分类:其他好文   时间:2014-06-03 11:38:25    阅读次数:314
linux shell设置颜色
使用echo或者printf时,可以添加输出文本的颜色设置echo -e "Maximum \e[1;31m" $max_threads "\e[0mthreads allowed!" >> $term_dir/summary或者printf("\033[;34mfile\033[0m")31开始代...
分类:系统相关   时间:2014-06-03 09:11:52    阅读次数:306
cuda核函数再调用核函数,多层并行
#include __global__ void childKernel(int i) { int tid = blockIdx.x*blockDim.x+threadIdx.x; printf("parent:%d,child:%d\n",i,tid); for(int j=i;j<i+10;j++) { printf(",%d",j); } printf("\n");...
分类:其他好文   时间:2014-06-03 03:58:15    阅读次数:206
C语言学习_test2
1.互满数 #include #include int fun(int n); int main(void) { int x, y; for(x = 1; x { for(y = 1; y { if(fun(x) == y && fun(y) == x) printf("%d %d\t", x, y); } } return 0; } ...
分类:编程语言   时间:2014-06-03 03:28:21    阅读次数:274
C语言学习_test3
1.判断一个数是都是回文数 #include int main(void) { int a[100] = {0}; int n; printf("input n:"); scanf("%d", &n); int i, k, j; k = 0; j = 0; while(n != 0) { a[k++] = n % 10; n = n / 10; j+...
分类:编程语言   时间:2014-06-03 03:26:18    阅读次数:255
C语言学习_test1
1.从键盘上输入5个数,输出最大的、最小的元素以及他们的下标 #include int main(void) { int i, j, k, max, min; int a[10] = {0}; printf("input number:"); for(i = 0; i scanf("%d", &a[i]); max = min = a[0]; j = k = 0; ...
分类:编程语言   时间:2014-06-03 02:43:47    阅读次数:241
C语言学习_三分查找
三分查找: #include #define M 10 int main(void) { int front, near, mid1, mid2; int n; int found; int a[M] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; front = 0; near = M - 1; found = 0; printf("input n:");...
分类:编程语言   时间:2014-06-03 01:38:47    阅读次数:399
相识多少天
#include int main(void){ int year1, month1, day1, midDay; int year2, month2, day2; int totalDate1; int totalDate2; printf("请输入两个日期 年 月 日\n"); scanf("%...
分类:其他好文   时间:2014-05-31 13:58:57    阅读次数:240
[掌眼]微信支付测试返回:access_control:not_allow或system:access_denied
转自:http://mp.weixin.qq.com/qa/index.php?qa=11634&qa_1=%E6%94%AF%E4%BB%98%E8%BF%94%E5%9B%9E%EF%BC%9Aaccess_control-not_allow&show=16550感谢:乐游旅游比如我的测试js支...
分类:微信   时间:2014-05-30 20:25:50    阅读次数:8782
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!