张凌枫<2016.10.25> 【连续第3天总结】
A.今日任务
1.循环结构复习(90%)
2.指针和引用(90%)
3.const关键字(70%)
1.循环结构复习(90%)
2.指针和引用(90%)
3.const关键字(70%)
B.具体任务
1.搞了个金字塔觉得很好玩
2.指针的引用和引用的指针 指针的指针和引用的引用感觉有点像绕口令不过实际用起来感觉还不错
3.const关键字到现在还没有找到用的地方
4.分号!!分号!!
1.搞了个金字塔觉得很好玩
2.指针的引用和引用的指针 指针的指针和引用的引用感觉有点像绕口令不过实际用起来感觉还不错
3.const关键字到现在还没有找到用的地方
4.分号!!分号!!
附代码:
#include <iostream>
//#include <stdlib.h>
using namespace std;
void jinzita(int x)
{
for(int i = 1 ; i<=x;i++)
{
for(int k = x-i ;k>0;k-- )
{
cout<<" ";
}
for (int y = 0 ; y<2*i-1 ;y++)
{
cout<<"*";
}
cout<<endl;
}
}
int main()
{
jinzita(60);
system("pause");
return 0;
}
#include <iostream>
//#include <stdlib.h>
using namespace std;
void jinzita(int x)
{
for(int i = 1 ; i<=x;i++)
{
for(int k = x-i ;k>0;k-- )
{
cout<<" ";
}
for (int y = 0 ; y<2*i-1 ;y++)
{
cout<<"*";
}
cout<<endl;
}
}
int main()
{
jinzita(60);
system("pause");
return 0;
}
#include <iostream>
using namespace std;
using namespace std;
int main()
{
int a;//张三
int &b = a;//小张
int *c = &b;//第?排
*c = 1;//小张在第一排
cout<<a<<endl;张三在第一排
{
int a;//张三
int &b = a;//小张
int *c = &b;//第?排
*c = 1;//小张在第一排
cout<<a<<endl;张三在第一排
system("pause")
return 0
}
return 0
}
明日任务
1.复习之前所学
2.函数的特性
3.内存管理
1.复习之前所学
2.函数的特性
3.内存管理
博客地址:http://blog.csdn.net/night__day/article/details/52905196