摘要: 1.字符型的应用之强制类型转换:#includeusing namespace std;int main(){ for(int i=32;iusing namespace std;int main(){ cout<<"特俗字符"; char ch='\r'; /* /r... 阅读全文
posted @ 2014-04-27 19:26 技术宅星云 阅读(6082) 评论(0) 推荐(0) 编辑
摘要: 局部变量: 在函数内部声明的变量为局部变量,局部变量的意思即该变量只存活在该函数中,假如该函数调用结束,那么该变量的寿命也结束了.举例:#includeusing namespace std;void swap(int ,int );//两个参数变量可以省略int main(){ int x=... 阅读全文
posted @ 2014-04-27 18:37 技术宅星云 阅读(478) 评论(0) 推荐(0) 编辑
摘要: 我们编写程序时一般有个习惯,写函数都爱把函数写到主函数的前面,一般常用的写法:#includeusing namespace std;void A(){ coutusing namespace std;void A(){ coutusing namespace std;void A();... 阅读全文
posted @ 2014-04-27 09:38 技术宅星云 阅读(770) 评论(0) 推荐(0) 编辑