腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
4
回答
"
operator
char
*“
问题
c++
operator
char
*“调用返回的指针无效。有什么想法吗?class Wrapperprivate: { _data = new
char
[length];
浏览 0
提问于2010-08-12
得票数 10
2
回答
“操作符类型和”混淆
c++
、
casting
、
static-cast
我有用户定义的类型:{ const
char
*
operator
&() const;
operator
char
() const;};CharProxy p(...); static
浏览 18
提问于2022-11-17
得票数 1
回答已采纳
1
回答
用修饰符显示从A到B的数字
c++
、
performance
、
io
、
sequence
示例:cout<< i (inputted
operator
here) b;#include <string> string choice;
char
(operato=='+' || operato==&
浏览 0
提问于2018-04-20
得票数 0
回答已采纳
2
回答
mystring类的重载数组运算符
c++
、
operator-overloading
、
c-strings
我已经解决了其他所有的
问题
,但是数组给我带来了麻烦,因为某种原因。); MyString
operator
=(MyString &); bool
operator
==(MyString &); bool
operator
==(const
char</em
浏览 5
提问于2015-11-28
得票数 2
回答已采纳
1
回答
<<运算符在C++中不起作用
c++
、
class
、
operators
我已经尝试了很多方法来解决这个
问题
,但是都没有效果,我真的很困惑我必须做些什么来解决这个
问题
。std::ostream&
operator
<<(std::ostream& os, const Book& b){returnos; friend std::ostream&
operator
<<(std::ostream&,
浏览 1
提问于2012-10-12
得票数 0
回答已采纳
2
回答
如何在C++中使用cstring库文件?
string
、
class
我怀疑
问题
与我的String类和库string类之间的冲突有关,所以我正在考虑更改#ifndef和#define行。; friend
char
*
operator
+(int, const String=(const String&){
浏览 26
提问于2015-08-02
得票数 0
1
回答
NULL隐式指针转换导致不明确的重载
c++
、
null
、
implicit-conversion
、
c++03
、
overload-resolution
有
问题
的C++03代码: #include <cstddef> explicit Foo(const
char
*){} Foo &
operator
=(
char
) {return *this;}int main() { Foo s("foobar")=(const
char</em
浏览 20
提问于2021-02-12
得票数 1
回答已采纳
1
回答
操作符重载,类中的“不命名类型”的
operator
=
c++
、
operator-overloading
class GridElem { GridElem(); GirdElem &
operator
=(const
char
_idata);friend
char
operator
-(const GridElem &lhs, const
char
rhs);
char
_data; inline
char
operator
-(const Gri
浏览 0
提问于2014-07-11
得票数 1
回答已采纳
1
回答
std::
operator
<< [ _Traits = std::
char
_traits<
char
> ]中的'
operator
<<‘没有匹配项
c++
#include <string> { Foobar(); ~Foobar(); 我刚刚发现,如果我将发生错误的行更改为以下代码:编译成功。呃...!解决这个
问题
的“最佳实践”是什么,这样我就不必使用上面丑陋的语法了?
浏览 0
提问于2011-01-31
得票数 4
回答已采纳
1
回答
使用我的数组类时的奇怪警告
c++
、
arrays
、
g++
、
compiler-warnings
、
gcc-warning
." << endl; } //Typecast
operator
//Subscript
operator
//Destructor=NULL); r
浏览 3
提问于2015-07-23
得票数 2
回答已采纳
2
回答
为什么std::ostream和
char
之间的
operator
<<函数是非成员函数?
c++
、
c++11
、
ostream
cout.
operator
<<(c) << std::endl; }a深入研究,我注意到std::ostream::
operator
<<()没有以
char
函数调用std::cout.
operator
<<(a)被解析为std::ostream::
operator
<<(int),这说明了输出。我假设std::ostream和
char
之间的
char
函数在其他地方声明
浏览 5
提问于2015-07-07
得票数 38
回答已采纳
4
回答
将两个通过引用传递的字符转换为字符串?
c++
、
string
、
character
<< (ostream &, const Example<U>&); templ
浏览 0
提问于2013-03-19
得票数 1
4
回答
Operator
[]重载写/读之间的区别?
c++
、
pointers
、
reference
、
operator-overloading
我是C++的新手,因为这个
问题
我很抱歉,但这是一个艰难的过程。如果有人能帮我区分以下几行,我将不胜感激。
char
&
operator
[](int); // write (why with reference?)
char
operator
[](int) const; //read (why without a reference?)
char
const &
operator
[](int) co
浏览 0
提问于2014-12-14
得票数 5
3
回答
将字符串重新定义为类
c++
、
operator-overloading
、
copy-constructor
我必须将字符串重新定义为类,并且对
operator
+重载或复制构造函数都有
问题
。我的main()编译,但没有提供任何东西或涂鸦作为回报。下面是类字符串的片段:
char
*nap; nap=strcpy(new
char
[} String
operator
+(
浏览 4
提问于2016-01-22
得票数 1
回答已采纳
2
回答
用C语言编写的基本计算器只增加了
c
、
calculator
代码如下:double num1;double x;scanf("%lf\n", &num1); scanf("%lf\n", &num2); printf("Select
operator
:\n Division\
浏览 1
提问于2020-01-30
得票数 0
2
回答
std::vector::
operator
[]的不明确重载
c++
vector_
char
;{ c_string(size_t size) : vector_
char
* data() const { return this->data(); }
operator
conststl_vector.h:768:7:note: candidat
浏览 1
提问于2012-09-29
得票数 0
回答已采纳
2
回答
虚方法,
operator
=(),
operator
<<();
c++
、
class
、
inheritance
、
objective-c++
class Portprivate:
char
style[20]; // i.e., tawny, ruby, vintagepublic: Port(const Portint year; // vint
浏览 3
提问于2015-06-08
得票数 0
3
回答
比较gtest中的ptr和nullptr
c++
、
googletest
有一些代码:我得到了以下编译错误: could be 'std::basic_ostream<
char
,std::
char
_traits<
char
>> &std::basic_ostream<
char
,std::
char
_traits<
char
>>::
opera
浏览 0
提问于2019-02-14
得票数 11
回答已采纳
1
回答
如何避免强制转换操作符()和访问
operator
[]冲突?
c++
、
casting
、
operator-overloading
、
typecasting-operator
在内部,我希望将类型转换重载到
char
*和access
operator
[]。m_str[pos]; }
operator
const
char
*() const{ return str(); } // cast
operator
operator
char
*() { retur
浏览 2
提问于2019-11-21
得票数 2
回答已采纳
1
回答
stringList和字符串
c++
、
qt
、
declaration
、
forward-declaration
、
qstring
Qt库如何解决QStringList和QString类正向声明
问题
。(); int sizeOfString()const;
char
operator
[](int offset)const; monString &
operator
浏览 0
提问于2015-12-16
得票数 1
点击加载更多
相关
资讯
Kubernetes Operator基础入门
SQL Server Binary 类型和 Char类型数据
MySQL中如何选择VARCHAR和CHAR类型
深入理解Kubernetes Operator
Python进阶之路:operator模块
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
语音识别
活动推荐
运营活动
广告
关闭
领券