Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » pragma vs dynamic cast(warnings when compiling project)
pragma vs dynamic cast [message #1859589] Sun, 18 June 2023 15:36
sydney faria is currently offline sydney fariaFriend
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
Previous Topic:is there any possibilities to change the indexer preference page - programmatically
Next Topic:vectors
Goto Forum:
  


Current Time: Sat Jan 18 05:27:53 GMT 2025

Powered by FUDForum. Page generated in 0.03257 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top