Advertisement

Need help using AP classes with DJGPP

Started by March 05, 2001 05:54 PM
7 comments, last by stevante 23 years, 11 months ago
For my computer science class project I want to use DJGPP but my stupid teacher requires us to use crappy AP classes. I had no problem compiling apstring.cpp with DJGPP but when i try to compile apvector.cpp, i get tons of redeclaration errors. Does anyone know how to fix this or know where I can get a DJGPP-friendly version of apvector.cpp? Thanks.
Not that this will help you much, but I tried to convince a professor at my school (luckily I taught myself C/C++ without having to take classes) to use the STL (which is pretty efficient and fast) instead of the AP classes (which are not all that fast), but he''s so stuck in their methods of teaching that he refused...

I personally think you can try to write your own version of the AP classes (I did a couple of them a while back for a friend, just the simple ones, since I don''t know the AP classes that well, I like writing my own ), but if you''re taking a class that uses them, you probably don''t know enough to write your own yet...

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/
Advertisement
Actually I was programming years before this class, and could write my own version of apvector, but being lazy I wanted to see if I could get it to work without rewriting all of it.
I''m not sure, but I heard something about how apstring is different from the other AP classes. Something about how they''re linked that makes it so u have to include apstring.cpp (or maybe not include). What u need to do is try linking and including stuff in different ways. Maybe something will work. The way I did things was in the main .cpp file, include apstring.h, apvector.h, etc. Then, include apstring.cpp or apvector.cpp in the project. Try that.
C:DOSC:DOSRUNRUN DOSRUN
Nice . Sorry if that was insulting or anything, I just assumed you were a student.

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/
Ugh... I cringe thinking about AP classes. There is always some bloody linker error! Most of the time you have to include the .cpp files to fix the problem. ARGH!! Why do we use them? When I found out about STL, I was like, WTF?! Those AP classes basically copied the STL classes. Why? Who knows. It certainly doesn''t make programming (and compiling/linking) any easier. Cross platform shouldn''t be a reason, since STL is supposed to be STANDARD. I guess the only reason is that it''s simple enough for students to disect and understand (and append new methods to). The STL is horrible to look at. Templates and pointers can quickly destroy code readability.
Advertisement
I found out a while ago that the AP classes were meant to become the standard, but they sucked, and the STL was half done at that point. When the STL classes were finished and adopted as a standard, people were already too stuck in the tradidion of AP classes to move themselves to the STL.

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/
I had similar problems with the AP Classes (I hate them, the AP poeple can't write code for crap). I had problems using them with VC++ becuase they were meant for ...shiver shiver... DOS C++ specifically Turbo C++ 3.0. So I found the AP Classes for Visual C++ on the internet (Typed in AP classes into Altavista). They work fine except for APQueue which has the same .cpp file as .h file. But maybe thats been updated. Hope this helps.

And oh yeah - you have to #include "apstring.cpp" (doesn't matter if you have "apstring.h" for it to work. That is Unless you add apstring.cpp into your project, which in that case you only have to use "apstring.h"


Edited by - CpMan on March 6, 2001 9:16:04 PM
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
One more thing. #Including apvector.cpp will give you linker errors
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.

This topic is closed to new replies.

Advertisement