Want to put Functions in another source file

This is a discussion on Want to put Functions in another source file within the C++ Programming forums, part of the General Programming Boards category; I am starting a basic animation program using direct x. The functions of it, I want to put in another ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    50

    Want to put Functions in another source file

    I am starting a basic animation program using direct x. The functions of it, I want to put in another source file or header file to make the program as short as possible for readability purposes.


    I don't know how to make a header.
    Is it as simple as putting the functions in another source file?

    Do I need to use the extern command in my code somewhere?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,742
    FAQ
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    50

    thanks

    thanks

    just wish I could save the web page. It keeps telling me that it can't save to the specified location.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 01:36 PM
  2. Need help understanding Header Files
    By Kaidao in forum C++ Programming
    Replies: 11
    Last Post: 03-25-2008, 11:02 AM
  3. functions in .C file not recognized in .CPP file
    By tooKool4School6 in forum C++ Programming
    Replies: 1
    Last Post: 06-02-2006, 11:30 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM

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