风歌的blog

已搬家到 blog.imxjf.top
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  A.C/C++

摘要:错误描述大概如下:[Error 2][cmd: [u'bash', u'-c', u"g++ 'D:\\codeblocks\\project\\test.c' -o 'D:\\codeblocks\\project/test' && 'D:\\codeblocks\\project/test'"]... 阅读全文

posted @ 2014-08-21 00:02 风歌 阅读(505) 评论(0) 推荐(0)

摘要:void main(){int i,j; for(i=101;i<200;i++) { for(j=2;j<i;j++) { if(i%j==0) break; } if(j==i) printf("%d ",i); }} 阅读全文

posted @ 2005-08-20 17:09 风歌 阅读(541) 评论(2) 推荐(0)

摘要:main(_){_++<10 && main(_,printf("%*s\n",_<7?_+3:15-_,"*********"+(_<7? 12-2*_ : 2*_-12)) ) ;} 阅读全文

posted @ 2005-07-25 14:47 风歌 阅读(259) 评论(0) 推荐(0)

摘要:#include#include #include #include #include void signal_handler(int); int main(){ signal(SIGINT,signal_handler); srand(time(0)); for(int i=1;i>res; while(res!=1 && res!=2) { cout>res; } if(res==... 阅读全文

posted @ 2005-07-25 11:44 风歌 阅读(304) 评论(0) 推荐(0)

摘要:#include #include void *my_memcpy(void *restrict str1,const void *restrict str2,size_t n){ void * ret = str1; while(n--) { *(char*)str1 = *(const char* restrict)str2; str1 = (char*)str1 + 1; str2... 阅读全文

posted @ 2005-07-22 11:10 风歌 阅读(350) 评论(0) 推荐(0)

摘要:#include #include #define myMax(...) Max(__VA_ARGS__) int Max(int a,int b){ return (a>b? a :b);} int f(char str[static restrict 20],char ptr[static restrict 20]){ str[0]=ptr[2]; str[1]=ptr[3]; print... 阅读全文

posted @ 2005-07-21 00:48 风歌 阅读(348) 评论(0) 推荐(0)

摘要:#define INT8_C(val) ((int8_t) + (val))#define UINT8_C(val) ((uint8_t) + (val##U))#define INT16_C(val) ((int16_t) + (val))#define UINT16_C(val) ((uint16_t) + (val##U))见stdint.h 阅读全文

posted @ 2005-07-20 21:42 风歌 阅读(387) 评论(1) 推荐(0)

摘要:#include void displayBits(unsigned x){ unsigned m,i=1>x; displayBits(x); cout<<sizeof(unsigned); } 阅读全文

posted @ 2005-07-17 17:00 风歌 阅读(316) 评论(0) 推荐(0)

摘要:静态函数只在所定义的.c文件域中有效。 例子: // d.h#ifndef D_H#define D_H static void test();void test1();#endif //dp.c#include #include "d.h" void test(){ cout#include "d.h"using namespace std; void main()... 阅读全文

posted @ 2005-07-13 11:50 风歌 阅读(592) 评论(1) 推荐(0)