共 77 篇文章
显示摘要每页显示  条
size_type与 size_t一些概念由string类类型和vector类类型定义的类型,用以保存任意string对象或vector对象的长度,标准库类型将size_type定义为unsigned类型。为而来使用由string类型定义的size_type类型。一点注意:虽然是在学习标准库string的时候巧遇了size_type类型,但是,其实vector库也可以定义size_type类型,在vector库中还有一个dif...
280 f0814#include<iostream>#include<string>using namespace std;class student{static int number;public:void set(string str){name = str;}static void printNumber(){cout <<number <<"total number\n" <<endl;}void print(){cout <<name <<"-> students are "<<...
274main.cpp#include"ppoint.h"#include<iostream>using namespace std;}ppoint.cpp#include"ppoint.h"#include<cmath>using namespace std;void ppoint::set(double a, double b){x = a;}double ppoint::xoffset(){return x;}double ppoint::yoffset(){return y;}double ppoint::radius(){return (x*x + y * ...
//全局变量void func();void main(){int a = 1;int b = 1;cout <<a <<" "<<b <<" "<<n <<endl;func();cout <<a <<" "<<b <<" "<<n <<endl;func(); system("pause");}void func(){static int a = 2;int b = 3;a ...
帮助 | 留言交流 | 联系我们 | 服务条款 | 下载网文摘手 | 下载手机客户端
北京六智信息技术股份有限公司 Copyright© 2005-2024 360doc.com , All Rights Reserved
京ICP证090625号 京ICP备05038915号 京网文[2016]6433-853号 京公网安备11010502030377号
返回
顶部