代码搜索结果

找到约 10,000 项符合 C++ 的代码

c++

#include //定义名为ex_class的类模板 template class ex_class { T1 value1; T2 value2; public: ex_class(T1 v1,T2 v2) { value1=v1; value2=v2

c++

#include #include using namespace std; //测试字符串(string)对象 void main() { //创建string对象,并显示 string s1="This"; string s2="book."; cout

c++

#include #include #include #define PI 3.1415926535 //main()函数的定义 void main( void ) { int i; double x=PI/180; cout

c++

#include //包含iostream.h头文件 main() { //输入输出字符 char c; cin>>c; cout

c++

#include #include using namespace std; typedef list INTLIST; //从前向后显示list队列的全部元素 void put_list(INTLIST list, char *name) { INTLIST::iterator plist; cout

c++

#include main() { int i; //定义名为student的递归结构 struct student { char name[10]; int math; int computer; float sum;

c++

#include //基类Box class Box { int width,height; public: void SetWidth(int w) { width=w; } void SetHeight(int h) { height=h; } int GetWidth

c++

#include #include #include #include #include #define size 10 using namespace std; //产生指定范围的整数随机数 int getrand(int min,int max) { int m;

c++

#include main() { float a=3.5,b=2.1,c=0; cout

c++

#include main() { //定义结构类型 struct human { char name[10]; int sex; int age; }; //声明结构变量和结构指针变量,并初始化 struct human x={"WangPing",1,30},*p=