#include <iostream>
using namespace std;
template <class T>
class DynamicVector
{
T* array; // pointer to the items 指向分配空间的指针
unsigned mallocSize; // number of allocated spaces 分配空间的大小
unsigned numofItems; // number of items 向量内已经存储的元素数量
int virtualZero; // virtual zero 数组起始下标,C语言中通常数组下标是从0开始, 这个数据属性可以让数组的下标从-10或2等等整数开始 ,让数组更加灵活。
public:
......................
阅读全部
|
gougoudan
贴于 2020年5月20日 15:47
hide
bbsi
#include<iostream>
#include<iomanip>
#include<string>
#include<stdlib.h>
using namespace std;
struct student
{
char xuehao[10];//学号
char name[10];//姓名
char sex[5];//性别
char jiguan[10];//籍贯
......................
阅读全部
|
gougoudan
贴于 2020年5月17日 13:39
hide
bbsi
#include <windows.h>
/* This is where all the input to the window goes to */
LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
switch(Message) {
/* Upon destruction, tell the main thread to stop */
case WM_DESTROY: {
PostQuitMessage(0);
break;
}
......................
阅读全部
|
akuidefbug
贴于 2020年5月12日 20:44
hide
bbsi
#include<iostream>
using namespace std;
bool sushu(int s)
{
int aa=1;
while (1)
{
aa=aa+1;
if(s==1)
{
cout << "是素数";
break;
......................
阅读全部
|
赵祖恒
贴于 2020年5月1日 20:26
hide
bbsi
#include<iostream>
#include<string>
#include<fstream>
#include<windows.h>
using namespace std;
const double i = 1.5;
void cifang()
{
cout << "新功能正在开发中";
}
void jisuanqi(void)
{
......................
阅读全部
|
万致远醉帥
贴于 2020年4月14日 11:12
hide
bbsi
#include <stdio.h>
#include <iostream>
#include <math.h>
float f(float x, float y, float z) {
float a = x * x + 9.0f / 4.0f * y * y + z * z - 1;
return a * a * a - x * x * z * z * z - 9.0f / 80.0f * y * y * z * z * z;
}
float h(float x, float z) {
for (float y = 1.0f; y >= 0.0f; y -= 0.001f)
if (f(x, y, z) <= 0.0f) {
......................
阅读全部
|
辞汕楠
贴于 2020年4月8日 17:13
hide
bbsi
#include<bits/stdc++.h>
#include <unistd.h>
#include<windows.h>//Sleep函数
using namespace std;
void print(char *p)
{
while(1)
{
if(*p!=0)
printf("%c",*p++);
else
break;
......................
阅读全部
|
Lceo
贴于 2020年3月31日 09:11
hide
bbsi
#include <stdio.h>
#include <iostream>
#include <math.h>
float f(float x, float y, float z) {
float a = x * x + 9.0f / 4.0f * y * y + z * z - 1;
return a * a * a - x * x * z * z * z - 9.0f / 80.0f * y * y * z * z * z;
}
float h(float x, float z) {
for (float y = 1.0f; y >= 0.0f; y -= 0.001f)
if (f(x, y, z) <= 0.0f) {
......................
阅读全部
|
影流之主
贴于 2020年3月28日 22:02
hide
bbsi
#include<iostream>
#include<iomanip>
using namespace std;
void yiwei()
{
int chengshu, beichengshu;
cout << "一位乘法(请从大到小输入)" << endl;
cin >> chengshu >> beichengshu;
system("cls");
cout << setw(7) << chengshu << endl;
cout << setw(1) << "×" << setw(5) << beichengshu << endl;
cout << setw(7) << "-------";
......................
阅读全部
|
万致远醉帥
贴于 2020年3月28日 13:16
hide
bbsi
#include<iostream>
using namespace std;
const int jj = 6;
int main()
{
int i = 1;
int main[jj],*p[jj];
cout << "记录表";
for (size_t i = 0; i < jj; i++)
{
cin >> main[i];
......................
阅读全部
|
万致远醉帥
贴于 2020年3月27日 17:54
hide
bbsi