?? test.cpp
字號:
#include<iostream.h>
#include<iomanip.h>
#include<stdio.h>
int chartoint(char c){
int result=0;
int i;
for(i=0;i<8;i++)
{ if( (c&(char)(1<<i))!=0)
{ result=result+1<<i;}
}
return result;
}
void main() {
int weight[256];
int i;
char ch[256];
for(i=0;i<256;i++){
ch[i]=(char)i;
weight[i]=chartoint(ch[i]);
cout<<"第"<<i<<"個整數:"<<weight[i]<<"對應字符"<<ch[i]<<endl;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -