Connecting Tech Pros Worldwide Help | Site Map

make files

  #1  
Old January 5th, 2007, 09:15 AM
newbai
Guest
 
Posts: n/a
I have a query.Hope someone can help me in this!!!
A c++ code consists of include statements,main(),function defination
..now I want to make separte files.I mean the first file will be of only
include statements.The secand of funciton defination and third of
main().but I dont know how to make them?how do you name them??
can someone explain me with a simple example?
please be fast!!!thanks

  #2  
Old January 5th, 2007, 10:05 AM
Ondra Holub
Guest
 
Posts: n/a

re: make files


newbai napsal:
Quote:
I have a query.Hope someone can help me in this!!!
A c++ code consists of include statements,main(),function defination
.now I want to make separte files.I mean the first file will be of only
include statements.The secand of funciton defination and third of
main().but I dont know how to make them?how do you name them??
can someone explain me with a simple example?
please be fast!!!thanks
You can name your files as you want. Usualy exist some project or
company naming conventions. For C sources are usually used files with
..c extension. For C++ sources is typically used one of .cpp, .cc, .C
extension. For header files is used .h extension, sometimes is used for
C++ headers .hpp or .hh or .H.

There is no standard requirement how to name file with main (as for
example in java). one of the typical way is to place main function in
file main.cpp. Sometimes is the main function placed in file with the
same name as project.

It is important to use correct upper/lower case letters in #include
files, beacuse in some operating systems are used such filesystems,
where file header.h is different from Header.h.

Syntax of Makefile depends on which make are you using. It is compiler
(or better make) specific. Gnu make is not 100% compatible with
Microsoft nmake and it is not compatible with borland make (and of
course vice versa).

  #3  
Old January 5th, 2007, 01:15 PM
jussij@zeusedit.com
Guest
 
Posts: n/a

re: make files


newbai wrote:
Quote:
can someone explain me with a simple example?
Here are some make file tutorials:

http://www.zeusedit.com/forum/viewtopic.php?t=300

Jussi Jumpanen
http://www.zeusedit.com

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to make files in application dir in Vista? Sin Jeong-hun answers 2 March 29th, 2008 12:55 PM
Just wondering if anyone knows if there are converters to convert from: MS Visual C++ 6.0 or MS Visual Studio 2003 project files into UNIX autogen/configure/make files? KevinGPO answers 2 September 10th, 2005 05:45 AM
How to create a project file from make files in VC++ sudheervemana@hotmail.com answers 2 September 8th, 2005 06:05 AM
Q: Portable Way to Make Files Read Only Efrat Regev answers 1 July 18th, 2005 10:33 PM