multible files

This is a discussion on multible files within the C++ Programming forums, part of the General Programming Boards category; I want to be able to take my sound class, and functions and place them in there own cpp file. ...

  1. #1
    Christian
    Join Date
    Mar 2002
    Posts
    618

    multible files

    I want to be able to take my sound class, and functions and place them in there own cpp file. The problem with this is that it uses varibles from anoher file, and that other file uses varibles from it. Is there any way to do this, so that I don't have to lump everything together?
    I shall call egypt the harmless dragon

    -Isaiah 30.7

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Sounds like a job for the extern keyword.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Christian
    Join Date
    Mar 2002
    Posts
    618
    thanks hammer.
    I shall call egypt the harmless dragon

    -Isaiah 30.7

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create Copies of Files
    By Kanshu in forum C++ Programming
    Replies: 13
    Last Post: 05-09-2009, 08:53 AM
  2. add source files to embedded VC 4.0
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 04:28 AM
  3. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 05:45 AM
  4. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  5. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21