Thread: VC++ question

  1. #1

    VC++ question

    If you add a class (.cpp + .h file) to your project and you do not call that class. Can it give errors?
    I made the class a while ago and it allways worked perfecty

    example:
    the project contains:
    source files:
    - mp3.cpp //source file of class
    - threadtest.cpp
    header files:
    -mp3.h // header fiel of class

    test.cpp is a small windows program that displays a dialog box, a common dialog box and starts a thread. But does NOT use a single line of code from mp3.cpp, nor is mp3.h included an the test.cpp.

    I'll add the project as an attachment. but you'll need the DirectX SDK to compile it.


    edit:
    The error I get is unhandled exception in threadtest.exe: 0XC0000005: Access Violation
    Last edited by maes; 07-02-2002 at 07:07 AM.

  2. #2
    Registered User Zeeshan's Avatar
    Join Date
    Oct 2001
    Location
    London, United Kingdom
    Posts
    226
    >> If you add a class (.cpp + .h file) to your project and you do not call that class. Can it give errors?

    Only if there is some syntax error in the class code itself....

    Infact, we're all adding various MFC classes to our projects all the time...ofcourse we don't use each and every of them .. now do we? it doesn't give any errors

  3. #3
    >>Only if there is some syntax error in the class code itself....
    That isn't the case. the code compiles without errors or warnings.

    (Well there is one warning but it is a test variable. and I've taken care of that)

    But it has something to do with the thread I think. because when I leave it out, I have no problems then.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM