首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看C++
#include <iostream>
using namespace std;
class Point
{
private:
    double x;
    double y;

public:
    Point(double ix, double iy) :x(ix), y(iy){ cout << "Point Object Constructed." << endl; }
    virtual ~Point(){ cout << "Point Object Destructed." << endl; };
    virtual void Show() { cout << "x=" << x << ",y=" << y << endl;; }
......................
阅读全部 | gougoudan 贴于 2020年6月1日 19:48     hide bbsi
#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日 16:13     hide bbsi
#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
上一页 9 10 11 12 13 14 15 16 17 18 下一页