腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
3
回答
为
什么
unsigned
char
的结果不是
unsigned
char
<<
c++
、
bit-manipulation
unsigned
char
value = 0xff; // 1111 1111如何将无符号字符的位向左移位,以使位被截断,结果为1111 1110?我试图做的
是
读取一系列字节,并将它们解释为不同长度(1-32位)的
浏览 3
提问于2012-01-03
得票数 7
回答已采纳
5
回答
unsigned
char
array到
unsigned
int通过memcpy返回到
unsigned
char
array
是
颠倒的
c++
、
c
这不是跨平台代码...所有内容都在同一个平台上执行(即字节顺序
是
相同的..小字节序)。我有这样的代码:
unsigned
char
array[4] = {'t', 'e', 's', 't'}; std::cout <
浏览 0
提问于2009-10-18
得票数 4
回答已采纳
2
回答
Unsigned
char
std::vector到
unsigned
char
[]?
c++
、
stdvector
、
arrays
简单的问题
是
,如何创建一个函数,该函数接受一个
unsigned
char
std::vector并输出一个带有length的
unsigned
char
[]。谢谢!啊,好吧,看来我的问题
是
我对std::vector的了解。我一直认为std::vector不是以线性方式保存它的值。这解决了我的很多问题。谢谢!
浏览 1
提问于2010-07-12
得票数 2
回答已采纳
1
回答
char
* to array<
unsigned
char
^>
c++-cli
我将我的数据存储在本机
char
数组中(它必须
是
这样的,根本不能使用托管缓冲区),但是当通过调用Write(cli::array<
unsigned
char
^>, ...)方法发送到缓冲区时,它不接受指向本机数组的指针作为预期的第一个参数我可以简单地将朴素
char
缓冲区的内容复制到托管array<
unsigned
char
^>缓冲区中,然后将此缓冲区作为第一个参数传递给函数Write(...),但这肯定很费时。是否有一种将
char
浏览 2
提问于2014-12-05
得票数 1
回答已采纳
2
回答
Const
unsigned
char
* to
char
*
c++
、
string
、
types
、
char
所以,我现在有两种类型:string unencrypted_data;因此,我有以下几点:但是,我收到了这个错误: error C2664: 'strcpy
浏览 1
提问于2010-04-05
得票数 2
回答已采纳
2
回答
QByteArray和QList<
unsigned
char
>或QVector<
unsigned
char
>有
什么
区别?
qt
、
qlist
、
qbytearray
QByteArray保存单个字节,如果我们创建一个QList of
unsigned
chars,也将保存各个字节。当可以生成一个QByteArray时,QList<
unsigned
char
>存在的原因是
什么
QByteArray和QList<
unsigned
char
>或QVector<
unsigned
char
>有
什么
区别?我错过了
什么
?
浏览 3
提问于2016-03-21
得票数 0
回答已采纳
1
回答
char
*和
unsigned
char
*有
什么
区别?
c
、
linux
、
char
、
unsigned
在使用c的Linux中,当我读写二进制缓冲区时,我没有理解
char
*和
unsigned
char
*有
什么
区别? 不能使用
char
*而需要使用
unsigned
char
*时
浏览 2
提问于2020-06-18
得票数 0
3
回答
将
unsigned
char
*转换为const
unsigned
char
*后删除[]
c++
粗略地说,我有一个包含const
unsigned
char
数组的类。这个类的对象是由一个特殊的工厂函数创建的,该函数还负责构造数组(在堆上)。当在工厂函数中创建一个对象时,它将被赋予指向数组的指针。class Fooprivate: size_t size; Foo(const
unsigned
(const void* data, size_t size)
unsigned</em
浏览 4
提问于2013-04-19
得票数 8
2
回答
为
什么
istream_iterator<
unsigned
char
,
unsigned
char
>抛出std::bad_cast?
c++
、
stl
、
iostream
、
istream
、
istream-iterator
#include <iostream>#include <sstream> std::basic_stringbuf<
unsigned
char
> buf; // the next line throws std::bad_caston g++ 4.4
浏览 0
提问于2010-08-31
得票数 2
回答已采纳
3
回答
Unsigned
char
to
char
* and int in C?
c
、
visual-studio-2010
、
char
、
int
、
unsigned-char
所以,我有:
char
*plainchar;现在,假设明文实际上
是
一个"0123456789“的数据字符串-编辑--
unsigned
char
plaintext[16];
浏览 1
提问于2012-09-24
得票数 3
回答已采纳
2
回答
将带int的
unsigned
char
数组转换为
unsigned
char
c++
在我尝试通过buf之前,我应该强制转换len吗
unsigned
char
tmp[len + 1];错误
是
: error: cannot convert '
unsigned
char
(*)[(((
unsigned
int)((int)len)) + 1)]' to '
unsigned
char
*&
浏览 1
提问于2012-12-13
得票数 0
1
回答
如何将
unsigned
char
*转换为array<
unsigned
char
>^?
arrays
、
visual-c++
、
c++-cli
如何将无符号字符数组转换为提前感谢!
浏览 0
提问于2011-07-01
得票数 1
回答已采纳
2
回答
~(
char
) ((
unsigned
Char
) ~0 >> 1)到底发生了
什么
?
c
我不明白在这种一元运算符的组合中到底发生了
什么
。我知道当你输入它的时候,它最终会产生最小的带符号字符值,我不明白的
是
它到底
是
怎么回事。我认为解决方案
是
======================================================================== 字符不会转换为未签名的字符吗?然后我们将字符转
浏览 53
提问于2019-03-29
得票数 1
回答已采纳
4
回答
实现``memcpy()‘:
是
需要’`
unsigned
char
*‘,还是仅仅是’
char
*‘?
c
、
pointers
、
casting
、
char
、
unsigned
使用
char
*
是
安全的,还是需要
unsigned
char
*{ volatile
char
*dest_c= (volatile
char
*)dest;
浏览 0
提问于2019-03-02
得票数 2
回答已采纳
2
回答
unsigned
int与
unsigned
char
的比较
c
、
type-conversion
、
unsigned-integer
、
unsigned-char
、
mplab
我需要它与返回
unsigned
int的函数的输出进行比较。if (Data[2] == ReadFlash2(40)) //Do Something.ReadFlash2
是
一个返回无符号整数的函数,而Data[2]
是
一个无符号字符我是不是做错了
什么
?我应该投射哪一个,我应该投射到
什么
?
unsigned
浏览 1
提问于2013-06-19
得票数 1
回答已采纳
1
回答
铸造后增加-Wpedantic错误类型参数
c
、
gcc
、
pointer-arithmetic
、
gcc-pedantic
我有个密码{}有
什么
想法吗?
浏览 1
提问于2014-09-25
得票数 2
回答已采纳
1
回答
char
*和
unsigned
char
*强制转换
c++
、
linux
、
g++
、
binary-data
在做了一些研究之后,看起来无符号字符数组可能
是
存储数据的好选择。我不认为这会有
什么
不同,但我开始考虑是否应该只使用常规的
char
数组来存储数据。我见过人们为了这个目的同时使用
char
和
unsigned
char
数组,但我不能完全理解其中的区别。假设我有两个数组:
unsigned
char
b[20];file.read(a, 20); file.read((
浏览 0
提问于2015-12-21
得票数 4
4
回答
将
char
*转换为
unsigned
char
*
c
、
char
、
sha1
、
unsigned
、
strcpy
如何在C中正确地将
char
*复制到无符号
char
*。以下
是
我的代码{ strncpy(digest, argv[2], 20);} 我想正确地将
char
*数组复制到无符号
c
浏览 486
提问于2011-08-04
得票数 21
回答已采纳
2
回答
用于循环写入特殊符号
c++
、
char
void printchars() for (x=128;x<224;x++)我想让x在write函数中
是
一个字符。如何才能将x更改为在循环中被写函数视为
char
,而不是int?
浏览 0
提问于2011-10-08
得票数 0
回答已采纳
1
回答
basic_stringbuf::in_avail()和basic_stringbuf::str()有多可靠?
c++
、
stl
、
iostream
char
> stream2vector(std::basic_istream<
unsigned
char
>& stream) std::vector<
unsigned
char
> retreivedData; const std::istreambuf_iterator<
uns
浏览 1
提问于2010-08-31
得票数 0
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
即时通信 IM
活动推荐
运营活动
广告
关闭
领券