unsigned-char

unsigned-char

文章 0 浏览 7

caveats reinterpret_cast' in char* to nosigned char*?

我正在尝试将我的C ++应用程序适合C-API。所讨论的API是MBED_TL,其中包含一个base64解码器: int mbedtls_base64_decode( unsigned char *dst, size_…

清风夜微凉 2025-01-22 18:17:22 3 0

如何将 unsigned int 值存储到 unsigned char 变量?

假设我有 unsigned int x = 0x12a unsigned char y = 0x000 如何使x = y?当我尝试将 x 分配给 y 时,我得到 y = 0x02a …

月光色 2025-01-12 18:18:58 5 0

如何将 Unsigned Char 图像文件读取到 Python?

我有一个扩展名为“.image”的文本文件,文件顶部如下: Image Type: unsigned char Dimension: 2 Image Size: 512 512 Image Spacing: 1 1 Image Inc…

慕烟庭风 2025-01-09 13:10:49 3 0

方便地复制 std::vector输入流 (std::istream) 对象

我正在尝试使用第三方库中的一个函数,并且需要一个在其中传输二进制文件数据的输入流对象。 签名看起来像这样: doSomething(const std::string& ...…

心的憧憬 2025-01-07 01:08:51 5 0

unsigned char 和 char 指针之间的区别

我对 unsigned char (在 WinAPI 中也是 BYTE)和 char 指针之间的差异有点困惑。 目前我正在使用一些基于 ATL 的遗留代码,并且看到很多如下所示的表…

感受沵的脚步 2025-01-04 04:15:05 4 0

char 和 unsigned char 之间的指针陷阱的reinterpret_cast?

我使用以下函数来创建 UUID 并将其以人类可读的形式写入预先分配的缓冲区中。出了问题。 void createUUID(char* pDst) { UUID lUUIDObj; UuidCreate(&…

伤痕我心 2024-12-27 13:20:34 4 0

将 UIImage 数据转换为 const unsigned char myArry[100]

在目标 c 中, 我需要将 UIImage 转换为与以下类型匹配的内容: const unsigned char myImg[6300] = { 0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x0, 0…

↘紸啶 2024-12-26 13:12:09 3 0

比较 unsigned char 和 EOF

当编译以下代码时,它会进入无限循环: int main() { unsigned char ch; FILE *fp; fp = fopen("abc","r"); if(fp==NULL) { printf("Unable to Open")…

等风也等你 2024-12-22 09:45:27 7 0

为二进制数据创建字符串缓冲区的最佳方法

当我尝试以下操作时,出现错误: unsigned char * data = "00000000"; //错误:无法将 const char 转换为 unsigned char 有没有一种我缺少的特殊方法…

怎樣才叫好 2024-12-20 14:06:03 6 0

如何在Xcode中使用C语言处理网络数据包

我刚买了一个WIFI摄像头。我需要开发一个 iPad 应用程序来向该相机发送 url 请求,然后在 iPad 中播放 mpeg4 流。 该摄像机收到请求后,将网络数据包…

萌化 2024-12-15 21:28:00 5 0

我可以使用加密哈希作为文件名还是必须先将其转换?

我正在尝试对字符串进行哈希处理,然后使用该哈希值作为文件名。 我的问题:是我遇到的所有 C++ 哈希器/加密器都对 std::string 或 char* & 进行哈希…

叫思念不要吵 2024-12-11 01:55:17 5 0

将 unsigned char* 转换为可读字符串 &这个函数在做什么

我在谷歌上搜索了很多,以了解如何将我的 unsigned char* 转换为可打印的十六进制字符串。到目前为止,我稍微了解了它是如何工作的&有符号和有符号之…

岁月流歌 2024-12-08 05:02:48 6 0

在 C++ 中将 unsigned char(字节)数组转换为 unsigned Short

我有 array^ byteArray ,我需要提取 Little Endian 序列中的字节以生成无符号短整型和整数。我已经尝试了以下我能想到的所有组合,因此寻求帮助。 in…

我是有多爱你 2024-12-06 11:27:40 10 0

如何在目标c中动态创建无符号字符类型数组

我想根据另一个 nsmutablearray 的值在 Objective c 中创建一个 unsigned char 数组, 请帮助我, unsigned char buffer2[24]; buffer2[0] = 0X55; bu…

他是夢罘是命 2024-12-04 19:00:56 6 0

在内存中搜索字符串

我正在尝试让此代码正常工作,来自 此处 char *mem = (unsigned char *) 0xF0000; int length, i; unsigned char checksum; while ((unsigned int) me…

童话里做英雄 2024-12-02 13:02:06 7 0
更多

推荐作者

达拉崩吧

文章 0 评论 0

PANGOO

文章 0 评论 0

kkgtx

文章 0 评论 0

WordPress小学生

文章 0 评论 0

酷炫老祖宗

文章 0 评论 0

硪扪都還晓

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文