Timeline for How to pass Encoder object to constructor of a different class
Current License: CC BY-SA 4.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Aug 20, 2023 at 12:52 | history | suggested | Rohit Gupta♦ | CC BY-SA 4.0 |
Formatted error and made syntax highlighting work
|
| Aug 20, 2023 at 11:50 | review | Suggested edits | |||
| S Aug 20, 2023 at 12:52 | |||||
| Aug 20, 2023 at 11:04 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Apr 22, 2023 at 11:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Mar 23, 2023 at 9:31 | answer | added | Andrew | timeline score: 1 | |
| Mar 21, 2023 at 14:00 | history | edited | Juraj♦ |
edited tags
|
|
| Mar 16, 2023 at 4:58 | comment | added | Juraj♦ |
you can use reference. member and parameter as Encoder& type and in constructor initialization list you set the value of the member from the value of the parameter. MyClass::MyClass(Encoder& _encoder) : encoder(_encoder) {}
|
|
| Mar 15, 2023 at 22:49 | comment | added | jsotola | please copy all of the error message and paste it into your question ... do not put it into a comment like you just did ... also, no pictures of text ... format the text as code | |
| Mar 15, 2023 at 22:17 | comment | added | EricWeissman | I get "Compilation error: no match for 'operator=' (operand types are 'Encoder' and 'Encoder*')" | |
| Mar 15, 2023 at 20:30 | comment | added | chrisl |
What happens when you pass the Encoder object as pointer via &ElbowEncoder?
|
|
| S Mar 15, 2023 at 19:38 | review | First questions | |||
| Mar 15, 2023 at 19:43 | |||||
| S Mar 15, 2023 at 19:38 | history | asked | EricWeissman | CC BY-SA 4.0 |