Thread: using a class in multiple source files???

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    162

    Question using a class in multiple source files???

    I have a log file class that outputs data to a logfile from a program. Well, I have two source files in a project I want to use this log class in. I have a header that is included by both source files. It gives me some a link error saying it was already defined in one of the source files. I was using extern too. I have tried many things, but none work. How do I make it so that I can use the class in both source files?

    Thanks!

    BTW, I am using MSVC++ if that matters.
    Last edited by Crossbow; 06-16-2002 at 10:08 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mutex across multiple source files
    By Quasar in forum Linux Programming
    Replies: 7
    Last Post: 12-04-2007, 08:25 AM
  2. pseudocode for multiple source files
    By Calef13 in forum C++ Programming
    Replies: 4
    Last Post: 11-13-2007, 09:07 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Need help with input streams from multiple source files
    By orikon in forum C++ Programming
    Replies: 2
    Last Post: 10-08-2005, 02:56 PM
  5. Replies: 4
    Last Post: 06-18-2005, 02:26 PM