阅读程序
来源:互联网 发布:上海水利公司 知乎 编辑:程序博客网 时间:2024/04/29 22:52
/*
* Copyright (c) 2012, 烟台大学计算机学院
* All rights reserved.
* 作 者:庄子豪
* 完成日期:2013 年 4月5日
* 版 本 号:v1.0
*
* 输入描述:
* 问题描述:
* 程序输出:
* 问题分析:
*算法设计:
#include <iostream>using namespace std;class base{ private : int m; public : base (){}; base (int a){m=a;} int get(){return m;} void set(int a){m=a;}};//base_endint main(){ base *ptr; ptr=new base [2]; ptr->set(30); ptr=ptr+1; ptr->set(50); base a[2]={1,9}; cout<<a[0].get()<<","<<a[1].get()<<endl; cout<<ptr->get()<<","; ptr=ptr-1; cout<<ptr->get()<<endl; delete [] ptr; return 0;}
- 阅读程序
- 阅读 程序
- 阅读程序
- 阅读程序
- 阅读程序
- 阅读程序
- 阅读程序
- 阅读程序
- 程序阅读
- 阅读程序
- 阅读程序
- 阅读程序
- 阅读程序
- 阅读程序
- 阅读程序
- 阅读程序
- 阅读程序
- 阅读程序
- Chrome/Firefox等提示“安全证书不被信任”解决办法
- Android JNI 使用的数据结构JNINativeMethod详解
- 第六周上机项目一
- javax.annotation.Resource这个注解
- 改错 2
- 阅读程序
- Linux中文件系统的inode
- 用自己电脑做服务器发布网站
- 第六周上机任务 1
- android Kernel Start
- 2013-4-5.2
- Oracle Proxy Authentication(代理身份认证)
- oracle merge into与sqlserver merge into 比较
- Bitbucket使用方法