delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/18/22:46:32

From: "David Grant" <dgrant3 AT ibm DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Beginer's Question
Date: Wed, 17 Dec 1997 11:12:12 -0800
Lines: 24
NNTP-Posting-Host: 129.37.177.81
Message-ID: <34982465.0@news2.ibm.net>
Organization: IBM.NET
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I have a source code file called set.cc which used C++ and has a class
definition, and whatever.  To compile this file, I typed this at the command
prompt,

gcc -o set.exe set.cc -lgpp

I think that's pretty straightforward and I also know how to add
the -Wall, -O, and -g options also.

Now I want to split this into three files, one which has my class
definition, the function headers/prototypes called set.h; another, which
implements these functions, called set.* (what should I call this file?),
and another file which included the driver code, calls to the functions,
etc... called main.* (what should I call this file?)

Well, my main questions are, (1) what should I call these files, (2) how
should I refer to them in my source code in the #include line, and (3) how
do I compile these into an executable in one step.

If anyone can please help me it would be a great help.

David Grant


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019