我如何在动态分配的结构中释放()动态分配的数组
作者:programme3219873 提问时间:9/9/2021
我编写了一个程序来模拟“队列”数据结构——代码如下: queue.h: #ifndef QUEUE #define QUEUE typedef struct Q { int *queue; ...
针 问答列表
作者:programme3219873 提问时间:9/9/2021
我编写了一个程序来模拟“队列”数据结构——代码如下: queue.h: #ifndef QUEUE #define QUEUE typedef struct Q { int *queue; ...
作者:Tan Nguyen 提问时间:9/12/2021
我试图将指针数组分配给nullptr。 class ToyBox { private: Toy *toyBox[5]; int numberOfItems; public: ToyBox()...
作者:Luke Dunn 提问时间:9/14/2021
根据我对 C 语言的理解: 当你声明一个 2D 数组时,比如 ,程序会得到一块内存 (x*y) 的长。int array[x][y] = {0};int 当你对一个 2D 数组进行 malloc ...
作者:davdavdav2 提问时间:9/20/2021
我在编译以下代码时不断收到此警告,说“从'int'赋值到'_Bool'使指针从整数中转换而没有强制转换”,我不知道这意味着什么。我该如何解决这个问题?它通过了我所有的测试。*result = true...
作者:glades 提问时间:10/5/2021
在下面的代码中,我尝试通过 find_if 比较指针向量,并确定哪个包含成员 a == 5(在这种情况下,当然两者都有,但它显示了我的情况)。但是,它不会编译。 #include <algorith...
作者:Istiak Mahmood 提问时间:10/21/2021
我正在尝试安装项目的所有依赖项。Laravel Vue 从指令中,它说我需要运行 . 现在,当我运行它时,我正在收到npm run dev > ERROR in ./resources/js/sr...
作者:Vali RO 提问时间:11/1/2021
我编写了两个函数,readMatrix,它分配一个双指针并从键盘获取输入,第二个函数是打印函数。 当我在 main 函数中调用 print 函数时,它不能完全工作。 这是代码: void pri...
作者:Snorny 提问时间:11/5/2021
我的 stm32 目标的 C 代码有问题。 我收到此错误: 警告:传递“Proc_Start”的参数 3 中的指针目标在符号上有所不同 我真的不知道为什么,我在网上搜索了类似的主题,但这些主题中...
作者:Anil 提问时间:11/11/2021
#include<stdio.h> #include <string.h> #include <windows.h> #define PATH "F:\\c\\projects\\Banking M...
作者:Sarthak Gandhi 提问时间:11/13/2021
课堂论文{ private: int length; int *width; public: void set_data(int length, int width){ cout<<"insid...