Learnem Educational
May 18, 2012, 01:03:25 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Can I get move code to other files?  (Read 1683 times)
Anonymous
Guest
« on: September 01, 2002, 05:20:14 PM »

Is it possible in C/C++ to put some of your code in another .cpp file and run it from the main file? I have a whole lot of functions in my program, and I want to clean it up, so I want to move some of the code to another file and just be able to pull it up when I need it. Can I do that? Or is there another way?
« Last Edit: January 01, 1970, 12:00:00 AM by Anonymous » Logged
Anonymous
Guest
« Reply #1 on: September 14, 2002, 06:36:34 AM »

Yes it is possible.

Declare the functions in a headerfile and define them in a separate file (.c or .cpp) and include that file in the headerfile and then include the header in your main file.

It is the way to do it hope I used the right grammar.=)
« Last Edit: January 01, 1970, 12:00:00 AM by Anonymous » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!