如何根据 MISRA 正确转换 NULL?
作者:Imtiaz Kabir 提问时间:1/13/2023
(char *) NULL或触发器。char * msg = NULLMISRA 10.5: The value of an expression should not be cast to an i...
指针 问答列表
作者:Imtiaz Kabir 提问时间:1/13/2023
(char *) NULL或触发器。char * msg = NULLMISRA 10.5: The value of an expression should not be cast to an i...
作者:ZottoSL 提问时间:1/12/2023
这个问题在这里已经有答案了: 在 Go 中设置指向 int 值的 int 指针 (6 个答案) 10个月前关闭。 我需要映射结构来创建JSON结构。JSON 中的 collector_id 属性应该...
作者:NoamiA 提问时间:1/9/2023
我有一个带有 5 个长 int 的二进制文件,一切都按预期工作,但是当我读取文件中的最后一项时,文件指针从 func2 返回 NULL,int 的 func2 文件指针的末尾仍然不为 null,但是当...
作者:amongst3r 提问时间:11/12/2022
假设我有一组结构,它们被定义为 typedef struct myS { int content; char *string; } myT; 我想通过指针更改第 0 个元素字符串的值,这样就...
作者:gontu sandeep 提问时间:1/9/2023
这是我尝试编译程序时收到的警告的片段。我刚刚开始使用指针,由于某种原因,编译器标记了以下程序,我无法理解。代码如下: #include <stdio.h> int dec = 0; int *d;...
作者:Jonas 提问时间:1/5/2023
当我在两个不同的地方运行时,相同的代码会给我两个不同的输出。这是代码; #include <iostream> using namespace std; struct test { int val...
作者:professional pro 提问时间:9/9/2022
我最近看到的代码示例: #include <stdio.h> #include <stdlib.h> struct x { int a; int b; }; int main(void) {...
作者:Vikas Verma 提问时间:12/30/2022
char* iperf_get_test_json_output_string ( struct iperf_test* ipt ); // .h file 我在 swift 的 iOS 项目中使...
作者:Dinah 提问时间:12/20/2008
正如 Joel 在 Stack Overflow 播客 #34 中指出的那样,在 C 编程语言(又名:K & R)中,提到了 C 语言中数组的这个属性:a[5] == 5[a] 乔尔说这是因为指针算...
作者:ama coder 提问时间:1/20/2022
已关闭。这个问题需要细节或澄清。它目前不接受答案。 想改进这个问题吗?通过编辑这篇文章添加详细信息并澄清问题。 去年关闭。 改进此问题 如何在 Python 中创建这样的数组或 vetor: ...