pragma vs dynamic cast [message #1859589] |
Sun, 18 June 2023 15:36 |
sydney faria Messages: 54 Registered: March 2013 |
Member |
|
|
I'm studying design patterns and installed an example mediator design pattern into my project. It compiles OK but gives a few warnings, but it works. See mediator2.PNG & mediator4.PNG. When I use the #pragma (mediator1.PNG), the warnings go away when compiled and the code still works. Looking at mediator3.PNG the Edit constructor is looking for a char * and I am sending in a "string" and that is where the warnings are coming from. So I'm thinking about using something like a dynamic cast to fix this problem and not have to use the pragma. But to use a dynamic cast there has to be a virtual function first. Any one have any idea how to get around this pragma situation?
syd / wt1v
|
|
|
Powered by
FUDForum. Page generated in 0.03257 seconds