the first column | the second column |
---|---|
Error: Initializing from file failed | ![]() |
The First Column | The Second Column |
---|---|
void fun(int a ,int b) | parameter,when the function is called,the value of the parameter is not changed . |
void fun(int &a,int &b) | in fact it is a pointer way to transform |
void fun(vector &a) | |
void fun(vectora) | it need to perform a copy operation on the original variable |
pwd | print Working Directory |
yy | yank,复制 |
pp | paster,粘贴 |
parse | 解析 |
Comma-Separated Values,CSV | 逗号分割值 |
commoa | 逗号 |
imdb | Internet Movie Database 互联网电影资料库 |
metadata | 元数据 |
long factorial (int n)
{
if (n<=1)
return 1;
else
return n*factorial (n-1);
}
Fibonacci and n fratorial
def factorial(n):
if n== 0;return 1
return n*factorial(n-1)
int Factorial(int n)if(n==0)return 1;else return n*Factorial*(n-1);
/**
*Maximum subsequence
*/
/**
* Cubic maximun contiguous subsequence sum algorithm
*/
int maxSubSuml(const vector <int> &a)
{
int maxSum = 0;
for(int i=0;i<a.size();i++)
for(int j=i;j<a.size();j++)
{
int this Sum = 0;
for(int k=i;k<=j;k++)
thisSum +=a[k];
if (thisSum>maxSum)
maxSum=thisSum;
}
return maxSum;
}
/**
*1.const int max=100; //define const,do not modify the value of max
*2.const int max=100;int min=10; const int&ma= max;const int &mi=min;//define const reference,can't modify the value of a variable by reference.The varible pointed to can be not a const constant.
*3.const int max = 100;int min = 10;
const int *pMax = &max;const int* pMin = &min; pMax = &min;
*4.int max = 100; int *const pMax = &max;*pMax = 900;define the pointer const,pointer pMax is const,but can't modify the address the pointer point to.
*5.int max = 100; const int* const pMax = &max;
*6.constexpr and const value expression,and const int*p = nullptr; const pointer;constexpr int *q =nullptr
*7.void foo(const char*var)、void foo(const int&var) //the modifier parameter indicates that the value of the parameter cannot be modified in the function body.
*8.const int foo()、const int*foo() //the return value is const.
*9.void foo() const //
*/