GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 04-Jan-2008, 00:10
PC Nerd PC Nerd is offline
New Member
 
Join Date: Feb 2007
Posts: 13
PC Nerd is on a distinguished road

Class paths - defining in Dev-C++


Hi,

Im looking for where I can define the path to my classes, and im using dev-C++. Im new to C++, and have had previous exprience in Java. If anyone here is familiar with Java, im looking for the CLASSPATH system variable.

I was told that it was defined in the compiler options - however I seem to be unsuccessful to find it.

Thanks for your help in advance
  #2  
Old 05-Jan-2008, 11:02
Kimmo Kimmo is offline
Regular Member
 
Join Date: Mar 2007
Location: Finland
Posts: 349
Kimmo is a jewel in the roughKimmo is a jewel in the roughKimmo is a jewel in the rough

Re: Class paths - defining in Dev-C++


Hmm.

What exactly do you want to define? There should be only one path you need to define, the path to your class header files. This can be done in Tools | Compiler options | Directories | C++ Includes. Add the path to your header files there.

When you create a project in Dev-C++ (or in another IDE), it automatically instructs the linker to link all the files you have added to your project; you don't need to manually define paths to those.

So, say you have class Student, which consists of the header file student.h and the implementation student.cpp. In the additional includes you add the path to the header file (or add the header file to a directory already listed). Then you create a new project. Then, by right-clicking on the project name or from the Project menu you select "Add to project" and add the .cpp file to the project.
  #3  
Old 07-Jan-2008, 00:24
PC Nerd PC Nerd is offline
New Member
 
Join Date: Feb 2007
Posts: 13
PC Nerd is on a distinguished road

Re: Class paths - defining in Dev-C++


Ok...


Solved..

See i had already doen that - however I kept getting an error - and the way it appeared it looked like It couldnt find that .h file. HowevreI had accidently named it the same as an already existing .h file.

Thanks fo ryour help
 
 

Recent GIDBlogProblems with the Navy (Enlisted) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classes and allocating memory BlueFireCO. C++ Forum 13 26-Jul-2007 20:31
Hard drive/CPU Diagnoses Issues binarybug Computer Hardware Forum 1 22-Jan-2007 19:23
Box Class, need help again :( TransformedBG C++ Forum 7 13-Nov-2006 15:11
a tester class and then some. postage Java Forum 1 06-May-2006 15:48
defining a struct inside a class :( kai85 C++ Forum 2 14-Apr-2005 02:56

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:58.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.