The version 5.02 has neither of these (but it works under Windows).
Namespace std | Borland C++ 5.02 does not implemented the 1998 C++ namespace standard with respect to <iostream>. This provides several work arounds. |
Fixing the Context Sensitive Help
Well, the help file is available (in classlib.hlp), but by default, it is not searched when you press F1. In order to add classlib.hlp to the search tree, run
c:\BC5\BIN\openhelp.exeand add
c:\BC5\HELP\classlib.hlpto the default set of help files. Alternatively, you could change the default selection to All
For iostream.h, there is some help. However, there are no examples and there is no help on cin or cout. (Neither one is in the help index.)
To get useful help, double click on
C:\BC5\HELP\classlib.hlpand navigate to
Contents / Using iostreams classesThis actually explains how to use streams.
Of particular interest is the console stream (constream defined in constrea.h) which provides the functionality of conio.h, including
Set color | setclr(int) |
Goto xy | setxy(int, int) |
Hide the cursor | setcrsrtype(int) |
The following is from the Borland C++ help (with a few modifications)
#includeIt also is not clear if constrea.h is part of C++ (ie, it should be available in unix) or if it is just another Borland extension. I am particularly suspicious because constrea.h includes conio.h.int main(void) { constream win1; win1.window(1, 1, 40, 20); // Initialize the desired space. win1.clrscr(); // Clear this rectangle. // Use the parameterized manipulator to set screen attributes. win1 << setattr((BLUE<<4) | WHITE) << "This text is white on blue."; // Use this parameterized manipulator to specify output area. win1 << setxy(10, 10) << "Text at a specified location"; return(0); }
Directories
\\computerName\pathA mapped directory is accessed via someting like
x:\pathBorland C++ 5 will allow you to edit and compile programs using an un-mapped directory ... but the linker fails. (In general, DOS programs can not use un-mapped network addresses. Therefore, I assume that the linker is a DOS program.)
The error message is fairly cryptic, simply stating that the make failed.
Keyboard Shortcuts
C++ Standard Library classes
Target Type = Application[.exe] Platform = Win32 Target Model = Console
Debug
The necessary parameters can be set either when you create a new project or via the TargetExpert... available by right clicking the exe file in the project window.
For a console application, select
Target Type = Application[.exe] Platform = Win32 Target Model = Console
In the Project window, right click the cpp file, select Edit node attributes and set the Style Sheet to None. Some references suggest that the Style Sheet should be set to Debug Info and Diagnostics. While this works fine in Windows 98, it is my experience that this causes a problem in Windows XP. Specifically, using Windows XP, I get "Thread stopped .... Access violation" when I try to single step through
cout << "aa";Setting the Style Sheet to None solves this problem.
If you set the Target Type to EasyWin[.exe], you will not be able to use the integrated debugger.
#if !defined(__BORLANDC__) using namespace std; #endif