?? vc0304.cpp
字號:
// Example 3-4:求字符串的長度
#include <iostream.h>
int mystrlen(char string[])
{
int len = 0;
while(string[len]!='\0')
len = len+1;
return len;
}
void main()
{
char sentence[] = "This is a sample.";
cout<<"The length of sentence: "<<sentence<<" is "<<mystrlen(sentence)<<endl;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -