Thread: external classes

  1. #1
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459

    external classes

    can i do external class definitions with the extern keyword? i don't want to have a seperate copy of the class definitions... [or seperate them from the class function declarations and include them parallel per each obj code / cpp]...

    something like...

    Code:
    extern class MY_CLASS;
    extern MY_CLASS class_instance;
    also, if MY_CLASS is nested with many subclasses, do i have to extern those as well [provided that i _could_] correct? thanks quite so...
    hasafraggin shizigishin oppashigger...

  2. #2
    Why not? I'm pretty sure you can.
    What will people say if they hear that I'm a Jesus freak?
    What will people do if they find that it's true?
    I don't really care if they label me a Jesus freak, there is no disguising the truth!

    Jesus Freak, D.C. Talk

    -gnu-ehacks

  3. #3
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    Code:
    q.cpp:16: `extern' can only be specified for objects and functions
    error... so no? DJGPP is my compiler... and if there isn't a standard for this, i'll be damned... any alternative that does require seperation or duplication of the class declaration inclusion?
    hasafraggin shizigishin oppashigger...

  4. #4
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    please continue it here...

    external user defined types
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  4. debug to release modes
    By DavidP in forum Game Programming
    Replies: 5
    Last Post: 03-20-2003, 03:01 PM
  5. Ask about these "unresolved external symbol" error
    By ooosawaddee3 in forum C++ Programming
    Replies: 1
    Last Post: 06-29-2002, 11:39 AM