码迷,mamicode.com
首页 >  
搜索关键字:const char p    ( 57984个结果
[汇编] 统计字符
1 ;编写一个有主程序和子程序结构的程序模块。 2 ;子程序的参数是一个N字节数组的首地址TABLE,数N及字符CHAR。 3 ;要求在N字节数组中查找字符CHAR,并记录该字符出现的次数。 4 ;主程序则要求从键盘接收一串字符以建立字节数组TABLE, 5 ;并逐个显示从键盘输入的每个字符CHA....
分类:其他好文   时间:2014-05-08 11:52:37    阅读次数:375
const
#include#includeusing namespace std;int main(){ const int N=100; int const N=100; //二者等价 int mark=0; //1 int* ref_mark=&mark; int* c...
分类:其他好文   时间:2014-05-08 10:02:04    阅读次数:205
template(1)
#include#includetemplateinline T const& max(T const& a,T const &b){ //如果a<b,那么返回a return a<b?b:a;}int main(){ int i=42; std::cout<<"max(7,...
分类:其他好文   时间:2014-05-08 09:50:44    阅读次数:264
boost::bind实践2——来自《Beyond the C++ Standard Library ( An Introduction to Boost )》
直接代码:代码段1: 1 #include 2 #include 3 #include 4 5 class some_class 6 { 7 public: 8 typedef void result_type; 9 void print_string(const ...
分类:编程语言   时间:2014-05-08 09:49:53    阅读次数:368
十一周 项目2 职员有薪水了 扩展
#include #include using namespace std; class CPerson { protected: char *m_szName; char *m_szId; int m_nSex;//0:women,1:man int m_nAge; public: CPerson(char *name,char *id,int sex,int age); voi...
分类:其他好文   时间:2014-05-08 08:15:08    阅读次数:250
byte,short,char的类型转换
《java深入解析》中例子:在平时对byte char short这几个范围较小的类型声明并赋值时,往往忽略了一个问题。在Java源文件当中为变量赋值时经常使用字面常量,这些常量在Java中是用int类型表示的。在为long类型赋值时我们会使用:long l = 123123123L;这是因为在赋值...
分类:其他好文   时间:2014-05-08 05:35:10    阅读次数:292
查缺补漏
1.非const变量默认为extern。而要使const变量能够在其他的文件中访问,必须指定它为extern。
分类:其他好文   时间:2014-05-08 05:25:52    阅读次数:212
HDU 1011 Starship Troopers(树形dp)
OJ题目:click here~~ 树上的01背包 const int maxn = 102; int val[maxn]; int w[maxn]; vector g[maxn]; int dp[maxn][maxn]; int n , m ; void dfs(int u , int father){ int v , i , j , k; for(i = w[u];i...
分类:其他好文   时间:2014-05-08 05:09:28    阅读次数:323
Java语言程序设计基础篇 方法(五)
生成随机字符生成随机字符就是生成0到65535之间的一个随机整数,因为0<=Math.random()<1.0,必须在65535+1(int)(Math.random()*(65535+1))随机生成小写字母publicclassRandomCharacter{ publicstaticchargetRandomCharacter(charch1,charch2){ return(char)(ch1+Math.ran..
分类:编程语言   时间:2014-05-08 03:19:35    阅读次数:435
linux下使用c判断文件夹是否为空的小程序
/*自己写了一个判断文件夹是否为空的小代码打开文件夹的函数在man的时候要加 man 3 readdir, */#include #include #include #include #include int isdirempty(char *dirname){ /* 打开要进行匹配的文件目录 */...
分类:系统相关   时间:2014-05-08 01:31:53    阅读次数:855
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!