ICode9

精准搜索请尝试: 精确搜索
  • 实验3 类和对象Ⅱ2021-11-10 20:33:23

    vector_int.hpp #ifndef vector_int_hpp #define vector_int_hpp #include <cstdio> #include <iostream> using namespace std; class Vector_int { private: int size; int *p; public: int& at(int x){ return p[x]; } V

  • 实验三 类与对象22021-11-09 23:01:47

    vector_int.hpp: #ifndef VECTOR_INT_H #define VECTOR_INT_H #include<iostream> #include<cassert> using namespace std; class vector_int { public: vector_int(int n) :size{ n } { cout << "Default constructor called."

  • 实验三 类与对象二2021-11-09 21:33:43

    实验内容4 Vector.hpp #include<iostream> #include<cassert> using namespace std; class Vector_int{ public: // Vector_int(int n); Vector_int(int n,int m); Vector_int(const Vector_int &v); int &at(int q); void show();

  • 实验三:类与对象Ⅱ2021-11-08 21:33:13

      任务四: vector.hpp: #include<iostream> using namespace std; class Vector_int { private:int n, ori; int* p; public: Vector_int(int x, int y=0) :n(x), ori(y) { p = new int[x]; int i; for (i = 0; i < n; i+

  • 数组小练习(2)——扫雷2021-11-08 13:04:08

    数组小练习(2)——扫雷 一、游戏介绍 扫雷,一款经典的小游戏,我们用c语言来实现一下。 二、编程思路 用两个二维数组来分别存储布置好的地雷数据和排查出来的地雷数据; 在存储布置地雷数据的二维数组中,用“0”表示没有地雷,用“1”表示布置了地雷; 在存储排查地雷数据的二维数组中,用

  • 二维数组中的查找2021-11-08 06:31:20

    /* * 在一个二维数组中,每一行都是按照从左到右 * 递增的顺序排序,每一列都是按照从上到下递增 * 的顺序排序。请完成一个函数,输入这样的一个 二位数组和一个整数,判断数组中是否含有该整数。 */ /* * 解法1:暴力搜索法,时间复杂度为O(n^2) */ #include<iostream> using namespace

  • 实验3 类与对象II2021-11-07 19:33:44

    #ifndef VECTOR_INT #define VECTOR_INT #include<iostream> #include<cassert> using namespace std; class Vector_int { public: Vector_int(int n); Vector_int(int n, int m); Vector_int(const Vector_int& x); ~Vector_int(); int

  • 实验三 类和对象Ⅱ2021-11-07 12:04:01

    四、实验结论 1.实验任务1-3 验证性实验。 2.实验任务4 vector_int.hpp #include<iostream> using namespace std; class Vector_int{ public: Vector_int(int n); Vector_int(int n,int value); Vector_int(const Vector_int &y); ~Vector_int(); in

  • 实验三 类与对象II2021-11-07 12:00:20

    实验任务四//vector_int.hpp#ifndef VECTOR_INT #define VECTOR_INT #include<iostream> #include<cassert> using namespace std; class Vector_int { public: Vector_int(int n); Vector_int(int m, int n); Vector_int(const Vector_int& x); ~

  • 面向对象->实验报告三(C++)2021-11-07 03:01:36

    欢迎访问我的个人博客: xzajyjs.cn task4 实验要求 main.cpp #include <iostream> #include "vector_int.hpp" int main(){ using namespace std; int x_len, y_len; cout << "请输入x的长度:"; cin >> x_len; Vector_int x(x_len

  • 实验三: 类和对象Ⅱ2021-11-06 18:00:39

    <vector_int.hpp> #ifndef VEXTOR_INT_HPP #define VEXTOR_INT_HPP #include<iostream> using namespace std; class Vector_int{ public: Vector_int(int n) :size(n) { p = new int[size]; cout << "创建成功,v"<<+

  • 实验三 类与对象II2021-11-06 10:33:49

    task4: 模拟实验任务2,不使用标准库模板类vector,自己动手设计并实现一个动态的整型数组类Vector_int vector_int.hpp 1 #ifndef VECTOR_INT_HPP 2 #define VECTOR_INT_HPP 3 #include<iostream> 4 #include<cassert> 5 using namespace std; 6 class Vector_int 7 { 8 pri

  • 实验3 类和对象II2021-11-05 20:31:30

    实验任务4 vector_int.hpp 1 #ifndef VECTOR_INT_HPP 2 #define VECTOR_INT_HPP 3 #include <iostream> 4 #include <cassert> 5 using namespace std; 6 class Vector_int 7 { 8 public: 9 Vector_int(int n); 10 Vector_int(int n,

  • 实验三 类和对象Ⅱ2021-11-05 18:33:15

    //Vector_int.hpp #ifndef VECTOR_INT_H #define VECTOR_INT_H #include<iostream> #include<cassert> using std::cout; using std::endl; class Vector_int { private: int size; int* p; public: Vector_int(int n); Vector_int(int n, int v

  • cpp实验三 类与对象II2021-11-05 18:02:20

    一、实验任务四 模拟实验任务2,不使用标准库模板类vector,自己动手设计并实现一个动态的整型数组类Vector_int, 使其支持以下要求: 支持在创建int型数组对象时,指定其大小 支持在创建int型数组对象时,指定其大小,并将数组对象中每个数据项初始化到特定的值value 支持用已经存在的int型数

  • 实验三 类与对象Ⅱ2021-11-05 09:31:16

    实验任务4: vector_int.hpp 1 #ifndef VECTOR_INT_HPP 2 #define VECTOR_INT_HPP 3 4 #include<iostream> 5 #include<cassert> 6 7 class Vector_int{ 8 public: 9 Vector_int(int n,int inital_val=0); 10 Vector_int(const Vector

  • 实验三 类和对象(二)2021-11-04 12:31:26

    #include <bits/stdc++.h> using namespace std; class Vector_int { private: int *arrayAd; int length; public: Vector_int(const int &B); Vector_int(const int &n, const int &m); ~Vector_int(); Vector_int(const Vecto

  • 实验三2021-11-03 18:02:37

    实验结论 实验五:实现Vector<int> vector_int.hpp   1 #pragma once 2 #include <iostream> 3 #include<cassert> 4 5 class Vector_int { 6 private: 7 int* arr; 8 int size; 9 public: 10 Vector_int (int _n, int val); 11 Vector_i

  • 实验三2021-11-02 22:32:37

    实验任务四 vector_int.hpp 1 #ifndef VECTOR_INT_HPP 2 #define VECTOR_INT_HPP 3 #include<iostream> 4 #include<cassert> 5 6 using namespace std; 7 class Vector_int 8 { 9 public: 10 Vector_int(int n) : size{n} 11 { 12 cout &l

  • 剑指offer13——机器人的运动范围2021-11-02 15:06:50

    题目描述:地上有一个 rows 行和 cols 列的方格。坐标从 [0,0] 到 [rows-1,cols-1] 。一个机器人从坐标 [0,0] 的格子开始移动,每一次只能向左,右,上,下四个方向移动一格,但是不能进入行坐标和列坐标的数位之和大于 threshold 的格子。 例如,当 threshold 为 18 时,机器人能够进入方格

  • 在C++上利用onnxruntime (CUDA)和 opencv 部署模型onnx2021-10-30 16:02:24

    概述 将得到的模型转化为onnx模型,加载到c++中运行,来完成模型的部署,下载并安装onnxruntime; CMakeLists.txt: cmake_minimum_required(VERSION 2.8) project(test) #使用clang++编译器 set(CMAKE_CXX_COMPILER clang++) set(CMAKE_BUILD_TYPE "Release") set(CMAKE_INCLUDE_C

  • opencv Mat QImage2021-10-28 08:32:05

    opencv Mat  QImage   if (imgParam.channels() == 3) { cv::cvtColor(imgParam, rgb, CV_BGR2RGB); img = QImage((const uchar*)(rgb.data), rgb.cols, rgb.rows, rgb.cols*rgb.channels(), QImage::Format_RGB888); } else {

  • c语言实现简单的扫雷小游戏2021-10-27 22:02:32

    a.输入坐标来排雷。 b.雷排完之后,胜利游戏结束。 c.踩中雷之后,失败游戏结束。 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<string.h> #include<time.h> #include<math.h> #define ROW 9 #define COL 9 #define ROWS ROW+2 #define COLS

  • QLabel显示opencv Mat图片2021-10-26 08:31:49

    QLabel显示opencv  Mat图片   void showImgOnLabel(QLabel* labelParam, cv::Mat imgParam, int showType) { cv::Mat rgb; QImage img; if (showType==1) { cv::resize(imgParam, imgParam, cv::Size(640, 480)); } else if (showType==2)

  • 力扣面试题08.02.:迷路的机器人(可回溯、可动态规划)2021-10-17 11:05:32

    一、题目内容          二、题目分析         机器人从左上角开始运动,每次只可以向右或者向下运动,不可以经过障碍物,到达右下角为成功。         那我们从(0,0)点开始,分别向右向下运动,如果运动的坐标超出的边界或者碰到障碍物或者坐标被访问过,就返回,如果是正常可访问

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有