Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » thread, virtual class and exception
icon5.gif  thread, virtual class and exception [message #15171] Mon, 07 April 2008 10:48 Go to previous message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
the old exception problem. i clarified the code and got different results after changing it between different senarios.
create a thread and pass an object's address. it is either a normal class or derived from a virtual class. the thread calls the object's function, which throws an exception. this exception sometimes causes the problem (program failure).

in main.cpp change lines below to see different behaviors. sometimes same code after changing and changing back gives different results.
line 23, virtual or not.
line 68, "new clss;" or "static_cast<clss *>(a);" for whether derived.
line 67, change it to "#if 0" usually makes the program run.

my project stalks here if this problem cannot be solved. thank you very much.
  • Attachment: test.zip
    (Size: 2.72KB, Downloaded 290 times)
 
Read Message icon5.gif
Read Message
Read Message icon1.gif
Read Message
Read Message
Previous Topic: Changing Editbox background color (EditString)
Next Topic: USB port communication
Goto Forum:
  


Current Time: Mon Apr 29 03:40:30 CEST 2024

Total time taken to generate the page: 0.02734 seconds