?? 10-0-1.cpp
字號:
#include<iostream>
using std::cout;
using std::cin;
using std::endl;
using std::copy;
char* duplicate_chars(const char* p)
{
//allocate enouth space; remember to add one for the null
size_t length=strlen(p)+1;
char *result=new char[length];
//copy into our newly allocated space and return pointer to first element
copy(p,p+length,result);
return result;
}
int main()
{
int* p=new int(42);
cout<<*p++<<" "<<++*p<<endl;
//43 //43
char str[]="cheng ning is a good student";
cout<<duplicate_chars(str)<<endl;
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -