Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

storing class declarations and user functions

Status
Not open for further replies.

mover50

Programmer
Aug 3, 2004
77
0
0
US
Where do I store user class and function declarations?

If I can store them in my home directory, how do I create a path so g++ can find it?

Thanks,

Kent
 
The user class and function declarations???

Are you refering to any program ir???

Generally speaking declarions are put in a header file (.h extension) and are included in the main program and definition of classes with the directive #include which can take two forms:

First form is user defined classes/libraries:
#include "my_file.h"
#include "../include/my_file.h"

Second form is system defined classes/libraries:
#include <string>
#include <iostream>

To compile against them include the rules for the class in make file and link against them.

Your question was a litle unclear, but I hope I answered what you were looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top