Thursday, July 9, 2009

Getting a "List Index Out Of Bounds (9)" error when I try to remove a file from a project...?

I'm using Borland CodeGear C++ Builder 2007. I've created a fairly complicated project that includes such features as database access, as well as the heavy use of classes and libraries.





I apparently have some sort of a library synching issue because, when the statements:





double xx = 0.0;


xx = Pln.Nrd.retireAge;





are executed, xx is 65 and Pln.Nrd.retireAge is 0. I don't understand how this is possible-- it's a direct assignment, after all!-- unless it's a problem with the library I'm using.





In a separate (related?) issue, I have some files included in the project: report.cpp, plan.cpp, and getp.cpp. When I try to remove them, however, a dialog box immediately pops up saying, respectively:





List index out of bounds (8),


List index out of bounds (9),


and List index out of bounds (7)





I also can't "Save All", because the list index out of bounds error pops up and prevents these files from saving.





Any thoughts or suggestions would be appreciated.

Getting a "List Index Out Of Bounds (9)" error when I try to remove a file from a project...?
Well, the problem is certainly in either Pln or Nrd. If you set xx and it becomes 65, then Pln.Nrd.retireAge MUST have been 65 before you called it. You should look for a bug in one of those classes that might cause the variable's value to reset to 0 after you retrieve it.

blazing star

Where can I download file clientdatamoduleu.h?

This file appears to be in C++ Borland Builder version 5. when I try to install it, there is an error message that indicates this file is missing.

Where can I download file clientdatamoduleu.h?
I haven't find this file at google or Yahoo. I suggest that you send an email to borland and request this file if you think that it should have come with the C++ Borland Builder.





http://www.borland.com


Does anybody know how to use CreateFile to send and receive data via teh parallel port in Windows XP?

I'm using borland Builder C++ 5 and i need to send and receive data via parallel port. I know this can be done using CreateFile, but I haven't found any tutorial or anything like that. Can you help me please?

Does anybody know how to use CreateFile to send and receive data via teh parallel port in Windows XP?
Why Borland C++ 5.0. Doesn't that predate XP by like 7 years or more?





BTW: Google is your friend. Google knows all. (see links below).


THashedStringList?

I'm using Borland c++ builder. I've added objects which are basically lists to a THashedStringList, how would I retrieve the object from the THashedStringList at a later date. I know I need to iterate through the list..possibly a for loop





TIA

THashedStringList?
Nobody knows that stuff. Maybe you should invest in a c++ book..


Which of the following tools is a direct competitor to Visual Studio?

a. Borland C# Builder


b. InstallShield DevStudio


c. Nant


d. Altova xmlspy

Which of the following tools is a direct competitor to Visual Studio?
b





Now gimme my 10 points
Reply:c. Nant
Reply:Borland C#Builder

imperial

Progressing to another programming language?

When I was at college I learned to program using c++ with Borland C++ builder.I now know the language quite well.It was a few years ago when I learned it and things have moved on a bit since then. I would like to start programming again but which programming language would be best to learn now and what compiler should I use?It would be a shame to learn something totally different after I know C++ so is there a way where I can still use my C++ knowledge?

Progressing to another programming language?
Java, or D (which comes from C++ if I'm correct), or the .NET languages. But C++ is a good language to keep.
Reply:There are many Free Software projects out there using C++ . For example, Inkscape, Scribus, 7-zip, and thousands more. If you're using one, and there's something bugging you, why not join in and create a patch?





If you'd like to try something else for the experience of it, the closest thing in syntax is Java. Or, you could move further away, and try a language using a different programming concept, such as Haskell.
Reply:C++ is still the central language of many projects large and small (For example, the Firefox web browser is written mostly in C++), so depending on what you want to accomplish, why not stay with C++? If you want to develop for Windows only, the free Visual C++ Express Edition (http://msdn2.microsoft.com/en-us/express... ) is a good choice to get started. If want to be cross-platform, look into tools and IDEs that use the free GNU gcc/g++ compiler instead (Cygwin - http://www.cygwin.com is a nice commandline environment for g++ on Windows). But if you really want to move on to more "modern" languages, maybe C# is worth a look. Microsoft has a free "Express Edition" for C# too and there's some support for C# and the .NET framework outside of Windows too with the Mono Project - http://en.wikipedia.org/wiki/Mono_%28sof...
Reply:Move to visual studio 2005 and the .NET platform. You can leverage your knowledge of c++ to pick up c# (becoming very widely used) or c++/cli, or just plain c++.
Reply:Why move on? Borland made good compilers. C++ is well used, Linux is written in C. Bprland C++ builder is a C++ compiler with a simple to user windows interface. Latter versions are available and will do well. Or you could look a Delphi which is the same front end as C++ builder but uses Pascal as the language.


Symbian Programming?

How i can write programs for Mobile with Symbian OS (Nokia Series 60) in Borland Delphi and/or Borland C++ Builder





I prefer Borland Delphi 7, but C++ Builder is also another good choice





i searched SDKs for this IDEs but i cannot find anything. help me!

Symbian Programming?
http://www.symbian.com/developer/index.h...





There is all the information you need.


How to install Borland Compiler?

I recently downloaded the 5.5 command line tool. I hav installed the .exe file.





But im unable to configure the compiler to run. I cant interpret the instructions in the readme file.





Pl help. i have completed step 1.





Installing and running the Command Line Tools


--------------------------------------...





1. Run freecommandlinetools.exe; choose the


drive and folder into which you want to


install the free C++Builder 5 command line


tool development system.





2. From the bin directory of your installation:


a. Add "c:\Borland\Bcc55"


to the existing path


b. Create a bcc32.cfg file which will set


the compiler options for the Include


and Lib paths (-I and -L switches to


compiler) by adding these lines:


-I"c:\Borland\Bcc55\include"


-L"c:\Borland\Bcc55\lib"


c. Create an ilink32.cfg file which will set


the linker option for the Lib path by


adding this line:


-L"c:\Borland\Bcc55\lib"

How to install Borland Compiler?
Ok, when step 1. completed it would have made a new folder. I will assume you did not change the name of this folder.





For step 2, part a.


If you are using Windows XP, go to 'Control Panel' (open it). Select 'System' (open it). Look for the 'Advanced' tab (select it). At the bottom is a button that says 'Environment Variables' (click on this). In the window that appears, you should see an entry for 'PATH'. Select this entry. Click on the 'Edit' button. Do not overwrite the text in here. What you want to do is to go to the end of the text in 'Variable value:'. Add this string without the quotes ";C:\Borland\BCC55\Bin" to the end of the PATH variable.


Note: There may be a 'Path' variable not a 'PATH', or even both 'Path' and 'PATH'. If you only have one, add it to the one. If you have two, add it to the one in the 'System variable' box/area.





If you are using windows 98, you can add to the path variable in the autoexec.bat file. This is usually located in the c: drive, and not in any folder You will need to right click (with your mouse) on the file and select 'edit' to be able to open it in a text editor. Add this string without the quotes ";C:\Borland\BCC55\Bin" to the end of the PATH variable. Ie, it usually says path=something;something\else;etc





For step 2, part b.


Create a new text file and rename it bcc32.cfg


To edit this file, right click (with your mouse) on the file (after selecting it). Then select 'edit'.


In this file you will need to add the lines mentioned.





For step 2 part c.


Create another text file and rename it 'ilink32.cfg'


Open it to edit as in the part b.


Add the lines mentioned.





Then, you will need to open a MS-DOS or Command Prompt box, if you use win98 or winXP, respectively. It is usually situated in Start -%26gt; All Programs -%26gt; Accessories





After opening the MS-DOS or Command Prompt, type in 'bcc32 -?" without the quotes into the command prompt. If all the above steps are successful, you will see a help message displayed.





Good luck.





[update] ps, you will need to add (create) those files in the 'C:\Borland\BCC55\Bin' folder / directory.
Reply:that happened to me. i just updated it
Reply:Try to check if your Command Compiler is in windows environment path


- Open Contol Panel - System


- On Advanced tab, click environment Variables


- In system variables, check if your c:\Borland\Bcc55 or c:\Borland\Bcc55\bin it's include in the path parameter, if not, edit and add the path.





Remember to check your command compiler wheter in c:\Borland\Bcc55 or c:\borland\Bcc55\Bin.





Hope this Help


Saturday, May 9, 2009

Where can I download C++ Builder 4 IDE ???

I have looked on the Borland web page but cant find a free download for the above. Does anyone know a website that I can download from???

Where can I download C++ Builder 4 IDE ???
have you checked http://www.programmersheaven.com

elephant ear

How to use the software CD that came with the C++ book by COHOON & DAVIDSON?

Here with the CD given that.


For use with the following compilers:


1)Borland C++ 5.02.


2)Microsoft Visual C++ 6.0.


3)Inprise C++ Builder 5.





And i have the compiler Microsoft Visual C++6.0,


so how to use the Ez windows API given with the


software CD by COHOON %26amp; DAVIDSON.


Please give the answer.


Early reply will be highly appreciated.


Thanking you.


Regards.


Satish kumar.

How to use the software CD that came with the C++ book by COHOON %26amp; DAVIDSON?
try blood shed dev c++ compiler i tried visual c++, borland, and many more i like blood shed dev c++ best and it has lots of templates that come bundled in with it, you can update the compilers library's with a breeze. try it out.


In this c++ destructors are not getting initialized!!!!(destructors for obj2 and obj1 ar'nt invoked?

/*The life cycle of an object*/


#include%26lt;iostream%26gt;


#include%26lt;conio%26gt;


class Test


{


public:


Test()


{


cout%26lt;%26lt;"Constructor invoked"%26lt;%26lt;endl;


}


~Test()


{


cout%26lt;%26lt;"Destructor invoked"%26lt;%26lt;endl;


}


};


Test obj1;


int main()


{


cout%26lt;%26lt;"main() begins"%26lt;%26lt;endl;


Test obj2;


{


cout%26lt;%26lt;"Inner block begins"%26lt;%26lt;endl;


Test obj3;


cout%26lt;%26lt;"Inner block ends"%26lt;%26lt;endl;


}


cout%26lt;%26lt;"main() ends"%26lt;%26lt;endl;


getch();


return 0;


}





the output i get is





Constructor invoked


main() begins


Constructor invoked


Inner block begins


Constructor invoked


Inner block ends


Destructor invoked


main() ends





it should have been





Constructor invoked


main() begins


Constructor invoked


Inner block begins


Constructor invoked


Inner block ends


Destructor invoked


main() ends


Destructor invoked


Destructor invoked





plz help(destructor should automatically be initialized isn't it?)


i am using borland c++ builder 5.2 is it a factor??

In this c++ destructors are not getting initialized!!!!(destructors for obj2 and obj1 ar'nt invoked?
The following answer is absolutly correct ....





Constructor invoked


main() begins


Constructor invoked


Inner block begins


Constructor invoked


Inner block ends


Destructor invoked


main() ends


________________


|Destructor invoked |


|Destructor invoked |


|________________|





But u can't see the last 2 statements (showed in block)....here what actully happened is ...





The destructore for obj2 will be called after the "MAIN() FUNCTION" is terminated" (i.e. after the closing braces).


B'coz, obj2 is declaired in main() function, so its life is in the main() function's scope.


The destructor for obj1 will be called just b4 the "PROGARMM" is terminated (i.e. bust b4 the programm is removed from the memory).


B'coz, obj1 is a globle object of TEST class and its life is thruout the programm.





I dont know about the Borland Compiler, but in Turbo compiler you can se the output screen again after termination of the program using "ALT + F5" and doing this will show the real output...





u can contact me if u still have doubts... send me message.
Reply:I have altered some of your code so it will compile AND run. Forgive me as I have cut parts out regardless, I found you had multple problems with the code, such as how you were actually giving the function protyptes in the class actual code (only pass them parameters if needed, you do all the code you want the function to do in the defintion. A class can ONLY have one deconstrutor. Also if you are compling this in one file...as your code showed...then why did you not use namespace std? That was probably half of your errors right there you would have had to use std::cout %26lt;%26lt; "stuff on screen";





Good luck.


#include%26lt;iostream%26gt;


using namespace std;





//Define Class


class Test


{


public:


//Function Prototype


void TestFunction();


//Destructor


~Test();


};








int main()


{


//Declare object/variable


Test obj1;





cout%26lt;%26lt;"main() begins"%26lt;%26lt;endl;


//Function call


obj1.TestFunction();


cout%26lt;%26lt;"main() ends"%26lt;%26lt;endl;





system("pause");


return 0;


}


//Function Definitions


void Test::TestFunction()


{


cout%26lt;%26lt;"Inner block begins"%26lt;%26lt;endl;


}


Test::~Test()


{


}
Reply:Yeah, the last poster is right. I added this line at the top:





using namespace std;





and made other minor changes to get it going on unix.





I get the output you expected:





Constructor invoked


main() begins


Constructor invoked


Inner block begins


Constructor invoked


Inner block ends


Destructor invoked


main() ends


Destructor invoked


Destructor invoked








So, you might have an issue with text output. That doesn't explain why you get some lines printed out and not others, though. So, yeah, you might also have a flaky compiler, since the code works as expected with g++.


C++ mutual-inclusion (mutual dependcies)?

Hi all. I am having an issue using Borland C++ Builder where I have 2 classes:


TTarget


TTgtMgr





Both classes include references to the other in the defintions (header) and the implementation (cpp)





I tried using forward declarations. This allows me to make vars


TTarget *tgt


TTgtMgr *mgr





in each others classes, however the problem is, in the implementation, I try to access the methods of the other class and I recieve the following compiler error:





Cannot access methods of %26lt;class%26gt; because %26lt;class%26gt; is not yet defined.





So for example in TTarget.cpp I do:


*TTgtMgr *mgr


mgr-%26gt;someMgrFunc();





And the error occurs.





I feel like some form of late binding might help but I really dont understand it well enough to implement such a fix.





Any thoughts on how I can remedy this problem?





Thanks!

C++ mutual-inclusion (mutual dependcies)?
In the .h files of the above two classes use forward declaration, no "*" required.





In TTarget.h before actual class definitions starts








/////////// TTarget.h file





class TTgtMgr; //forward declaration





class TTarget{





}








/////////// TTgtMgr.h file





class TTarget; //forward declaration





class TTgtMgr{





}





fill in the rest of the implementations


What C/C++ Compiler should I use?

C/C++ have many compiler, for example, Dev C++, wxDevCpp,Borland C++ Builder, GCC etc. So who can tell me Which C++ compiler should I use?


By the way I try to search about GCC by Google,and I download it, but I don't know how to install,if you suggest me to use GCC please tell me how to install and use it , I want to know about GCC,because Linux Sourse is design by GCC, so I want to know about it(GCC), Thanks a lot!

What C/C++ Compiler should I use?
The one i use and find myself very comfortable with is Dev C++.


Here is the site from which you can download it:





http://www.bloodshed.net/dev/





For further help in programming you can email me at maqsood_rahman@hotmail.com





Wish you all the best!
Reply:gcc - supports the most architechtures, has the most libraries, very advanced, most popular in open source community.





visual c compiler - fast code, not as flexible as gcc.


most popular in closed source community.





digital mars - very fast code very little support.





bcc - deprected, was good.





gcc is #1.





only use Microsofts vc++ compiler if you have reason to do so.





also note that things like devc++ and codeblocks use GCC as there compilers and are correctly described as IDE's.
Reply:I really like Dev-C++.
Reply:ok i know im late (sigh) DEV-C++

lady palm

Need help how to use the C++ builder compiler v5.5?

help me to those using the latest c++ builder of borland.. i dont still get it of how to enter code to make some programs and run it.. please i badly need this program....

Need help how to use the C++ builder compiler v5.5?
Ok, if you want to know how to make the source code, you just use a text editor like notepad. Then save the file with a ".cpp" extension. If notepad makes the file have a ".txt" extension, you will have to remove that, as the compiler will not recognise it.





If you need to know how to use the compiler and associated tools, have a look at the "readme.txt" file in the "BCC55" folder. That is where you installed the compiler, if you installed in a different place, you will find it there.


Using communication ports on Windows XP with Borlad Builder C++... Please HELPPPP!!!!!?

I need to be able to control a device via the parallel and the serial port. The platform is Windows XP and the compiler I'm using is Borland Builder C++. How can I do this if importb and outportb are no longer supported? I know I have to use the CreateFile function. How does this work? Any help will be appreciated!!!

Using communication ports on Windows XP with Borlad Builder C++... Please HELPPPP!!!!!?
try searching for some code on http://www.codeproject.com I dont know borland c++, but I found some code for doing it in vc++.


Where can I find the documentation for the class "TForm" from Borland C++ Builder 6.0?

I think this should help: http://www.functionx.com/bcb/controls/fo...


How can I get free eBook for Borland C++ Builder?

u can use any orkut community or ftp servers.else contact me.i may be able to find 1 for u

How can I get free eBook for Borland C++ Builder?
see the big white box above? type that in it and click search.

snow of june

What is the different between borland turbo C++ and Borland C++ builder?

Borland Turbo C++ (old Turbo C++) run under DOS environment : for Dos application only.


Borland C++ Builder run under Windows environment : for Dos and Windows application.

What is the different between borland turbo C++ and Borland C++ builder?
turbo c++ can be considered a 16-bit interface


while borland c++ is a 32-bit interface.





in other words turbo c++ runs only with dos and borland compatible with windows too.





but i recomend dev c++.


get it here


http://prdownloads.sourceforge.net/dev-c...


What is the different between borland turbo C++ and Borland C++ builder?

Thank for replying.

What is the different between borland turbo C++ and Borland C++ builder?
In 1983, Borland revolutionized software development with one of the first PC development environments, The new products revive the popular Turbo brand and provide users with a simple but powerful development environment that combines quick and easy learning with rapid productivity gains.





Borland Turbo C++ run under DOS environment (old Turbo C++).


Borland C++ Builder run under Windows environment.


Borland Turbo C++ Explorer is the new version of Borland C++ Builder.
Reply:output is same , similar programs like paintshop and paintbrush , different companies but aim is same.


How can I make a borland c++ builder 6 program run on a operating system that hasn't borland installed ?

download some other software which can compile the program


like "Turbo C++ version 1.01" etc

How can I make a borland c++ builder 6 program run on a operating system that hasn't borland installed ?
u to buy the program and install if u don't have a program u cannot run the program because C++ is very sensitive.