01 2011 档案

摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include <iostream.h>int*pPointer;void SomeFunction();{int nNumber;nNumber =25;//让指针指向nNumber:pPointer =&nNumber;}void main(){SomeFunction(); //为pPointer赋值//为什么这里失败了?为什么没有得到25cout<< 阅读全文
posted @ 2011-01-12 22:03 归无雨 阅读(381) 评论(4) 推荐(0)
摘要:晚上练习编程的时候,独立编写了一个圣诞树程序。//输出倒*圣诞树图象#include<iostream.h>#include<math.h>#define n 10void main(){for(int i=1;i<2*n;i++) {if(i<=n){for(int j=0;j<n-i;j++)cout<<" ";for(int k=n-i+1;k<n+i;k++)cout<<"*";}else{for(int h=1;h<n;h++)cout<<" & 阅读全文
posted @ 2011-01-09 00:38 归无雨 阅读(3349) 评论(10) 推荐(3)