Похожие чаты

Hi I have a class named MyChar it contain a char in

it self as holder

How can I do this?

char b = 'c';
MyChar& a = b;

A reference for char with my class

8 ответов

15 просмотров

I told you the code you wrote cannot be valid

operator overloading ?

A reference is an alias, you can’t use a different type for an alias, it doesn’t make sense

Prince Of Persia [field = CE,DM = BLOCK]
What about pointers?

In normal scenarios, neither. You can forcé it by converting it into another type’s pointer but if you are not using inheritance it’s not usually a very good idea

Prince Of Persia [field = CE,DM = BLOCK]
Char operator?

assignment operator and contructor from char. CMyChar(char& ref); CMyChar& operator = (char& ref); I've made similliar project to store value type to reference type (heap stored) as part of my CVariant class that can store all value type and CString type ;p. It' lots of fun.

John
assignment operator and contructor from char. CMy...

class Char : public Any{ private: char holder = '\0'; public: Char(); Char(char&); ~Char(); Char& operator=(char&); operator char(); Int toInt() const; Int toIntC() const; String toString() const; };

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта