03 2016 档案
摘要:function qsort void qsort (void* base, size_t num, size_t size, int (*compar)(const void*,const void*)); 各参数:1 待排序数组首地址 2 数组中待排序元...
阅读全文
摘要:显示效果如: #include#include #include typedef enum bool{ false, true}bool;bool isLeapYear(int year)//判断是否闰年{ if (year % 4 == 0 && year % 100 != 0 || ye...
阅读全文
摘要:#include#include #define N 10int main(int argc, char *argv[]){ FILE *fp; char str[N]; fp = fopen("in.txt", "r"); if (fp == NULL) { return 1; } whil...
阅读全文
摘要:#include using namespace std;int main(void){ cout << sizeof('a') << endl; return 0;} MINGW ,.cpp结果为:1 .c结果为4 VS2013 .c结果为:4 .cpp结果为1 原因: C99标准的规定,'a...
阅读全文
摘要:MINGW + notepad++ strlen遇到汉字的问题: #include #include using namespace std;int main(){ cout #include #include int main(int argc, char *argv[]){ int ...
阅读全文