Re: Progres with C++
- Posted by Travis Beaty <travisbeaty at arn.net> May 03, 2001
- 493 views
Howdy, Jan! > I have finaly discoverd what am I supost to do so I can run my *.cpp files > with Borland C++ 5.5 builder. I have found out that the compiler has to be > in the same directory as *.cpp file or *.cpp file has to be in the bin > directory.OK so far so good. But now there is a problem: where do the *.h > > file shas to be? They shoud be in the include directory like in Eu (well > they are :) but when I tipe bcc32 vector.cpp (it is in examples directory) > it says that he can't open some librarys. I know that in C++ librarys are > named file.h then I have looked the code and noticed that the #include > > file is without .h I have added this and still no luck. What am I missing? > Please help, I know there are a lot of you using Borland C++ As far as your include files (*.h), it can get pretty complex. Basically, you do it two different ways. First, like this ... #include <iostream.h> If you do this, then the compiler needs to know where your stash of include files are located. That should have been done when the compiler was installed. If not, you'll need to look at the compiler documentation and pass the location to the compiler using command line switches. (I use Borland C++ 5.02, which is a little different from Builder. Or, you can do this: #include "Janprog.h" If you do this, it will look for the header in the same directory as the *.cpp source file. Finally, I *think* if you use <iostreams.h>, then all the declarations in iostreams are placed in the global namespace. If you type <iostreams>, then you would access its functions using the C++ line using namespace std; but I'm not 100% sure on that. This is not a gripe, Jan, but remember that this is a Euphoria mailing list. The Borland community has quite a few mailing list for C++ questions ... I've used them myself. Go to community.borland.com, then select the C++ department. One other thing. Please consider not sending your vCard in your messages. (Had to look up the extension to figure out what it is.) There is something wrong with them, and it keeps setting off a warning in my browser (Opera5). The more security minded among us may delete your email without a second thought. Smile! -- Travis --