码迷,mamicode.com
首页 >  
搜索关键字:char    ( 35907个结果
Linux 设备驱动程序 字符设备
已经无法再精简,适合入门。 1 #include 2 #include 3 4 #include 5 #include 6 #include 7 #include 8 struct mengc_dev{ 9 char data[64];10 struct cdev...
分类:系统相关   时间:2014-05-26 22:52:42    阅读次数:371
二叉树非递归访问
二叉树非递归访问,借助一个栈,来模拟递归调用过程。struct TreeNode { char val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL...
分类:其他好文   时间:2014-05-26 22:25:25    阅读次数:353
c++中new char(10) 和 new char[10]的区别
今天随手写个程序,在网上随意找个代码照着写,无意中使用了char *p = new char(10); 来创建char数组,而且在netbeans上编译运行都没有问题,结果在oj上一直报runtime error,放在同学计算机上用codeblock运行也报错。 后来发现是这个分配的问题:c...
分类:编程语言   时间:2014-05-26 21:39:37    阅读次数:302
C语言变长数组data[0]
转载:http://www.cnblogs.com/Anker/p/3744127.html1、前言 今天在看代码中遇到一个结构中包含char data[0],第一次见到时感觉很奇怪,数组的长度怎么可以为零呢?于是上网搜索一下这样的用法的目的,发现在linux内核中,结构体中经常用到 data...
分类:编程语言   时间:2014-05-26 21:09:27    阅读次数:374
Linux 设备驱动程序 proc
不能再简化了#include#include#includeint meng_read_proc(char*page,char**start,off_t offset,int count,int*eof,void*data){ char*s="Hello. This is meng p...
分类:系统相关   时间:2014-05-26 15:52:49    阅读次数:463
内存分区
1 #include 2 #include 3 4 int k=1; 5 int main() 6 { 7 int i=1; 8 char *j; 9 static int m=1;10 char *n="hello";11 12 printf("栈区地址...
分类:其他好文   时间:2014-05-26 14:24:28    阅读次数:201
strchr函数
strchr函数(2011-09-23 08:53:12)转载▼标签:杂谈分类:ACM-study函数名称: strchr 函数原型: char* strchr(char* str,char ch); 函数功能: 找出str指向的字符串中第一次出现字符ch的位置 函数返回: 返回指向该位置的指针,如...
分类:其他好文   时间:2014-05-26 14:16:12    阅读次数:272
通过C语言获取MAC地址(转)
原文:http://blog.chinaunix.net/uid-25885064-id-3125167.html#include #include #include #include #include int get_mac(char* mac){ int sockfd; struct ifreq...
分类:编程语言   时间:2014-05-26 13:52:46    阅读次数:285
C++ Input Output
C++的IO比较复杂,记录一下碰到的问题:#include "stdafx.h"#include using namespace std;int main(int argc, char* argv[]){ cout << 22/5*3 << endl; printf("Hello Wor...
分类:编程语言   时间:2014-05-26 12:42:11    阅读次数:290
C++类型转换
会记下所有C++类型转换的例子在这里:#include "stdafx.h"#include using namespace std;int main(int argc, char* argv[]){ cout<< 22/5*3 <<endl; // 输出12,注意连进位都没有包括 re...
分类:编程语言   时间:2014-05-26 12:14:05    阅读次数:273
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!