www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/24/01:51:32

Message-ID: <3A4599B1.4737C8D3@home.com>
From: Robin Johnson <robbat2 AT home DOT com>
Organization: Orbis-Terrarum.Net
X-Mailer: Mozilla 4.7 [en] (Win98; U)
X-Accept-Language: en,af,es
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: please help me
References: <000b01c06d64$fce076e0$8cb13cd8 AT mainsystem>
Lines: 65
Date: Sun, 24 Dec 2000 06:37:29 GMT
NNTP-Posting-Host: 24.113.36.103
X-Complaints-To: abuse AT home DOT net
X-Trace: news1.rdc1.bc.home.com 977639849 24.113.36.103 (Sat, 23 Dec 2000 22:37:29 PST)
NNTP-Posting-Date: Sat, 23 Dec 2000 22:37:29 PST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> cody1 wrote:
> 
> I recently downloaded your wonderful c++ compiler and I absolutely love it.  I
> have one important question though that I really need help with.  I have some
> header and cpp files from school that allow me to use apstrings, apvectors,
> and apmatrices, which are just easier ways to manipulate strings, arrays, and
> multi-dimensional arrays.  However, whenever I tried using these with your
> compiler, I got the following error:
> this one is what happened when I tried to compile apvector.cpp from the
> command line:
> 
> " In file included from apvector.cpp:17:
> c:/djgpp/lang/cxx/apvector.h:127: apvector.cpp: No such file or directory
> (ENOENT)"
> 
> I tried using apvector.h without recompiling it, but to no avail.  Besides
> your compiler, I use Borland c++ 3.0, and it works perfectly in it with
> absolutely no errors at all, but when I try to use it with djgpp, it's
> completely filled with errors everywhere.  Please help me, as I look forward
> to using your great compiler (and the world of 32-bit applications), but I
> can't do without these libraries.  I have included the apstring.h and
> apstring.cpp files to allow you to see for yourself (if you have time) what's
> wrong with them.  Thank you for your time and consideration.

It's obvious that you are taking computer science AP, i had produced fixed up
versions of the ap string & ap vector originally, but then after i learnt
about the STL myself, it's far easy.

The AP classes are based on the STL classes,
so just do
#include <string>
#include <vector>
and work away.

There is one caveat empor though, to do a matrix, declare it as
vector<vector<basetype>> myVector;

a string:
string myStr;

You will also want to notice that the name of some methods, in particular
length is different in the AP vector, to the STL classes (size).

You will find the STL classes have all the power from before, and more!

-- 
Robin Hugh Johnson
"Robbat2"
QTOD: "I used to be an idealist, but I got mugged by reality."
E-Mail     : robbat2 AT orbis-terrarum DOT net
ICQ#       : 30269588 or 41961639
Home Page  : http://www.orbis-terrarum.net
Time Zone  : Pacific Daylight (GMT - 8)
-----GEEK CODE-{---
Version: 3.12
GU/CS d a--- C++++ L++++ U*+++ E---- 
e* h! tv-- X+ W+++ N+++ w--- M- P+ R 
D++ V-- PS+ PE-- Y+ PGP++ r !y t-- 5 
s+:- b+++
---}-GEEK CODE-----
-----PGP INFO-{---
Key ID:0x7E20DFA1
FingerPrint:
5447C73A 30FB144C 89521B69 2D6A615E 7E20DFA1
---}-PGP INFO-----

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019