PDA

View Full Version : need fast help on old C++ 3.0


learningbasics
12-07-05, 07:37 PM
ok 1st let me tell a little about me... well im in this computer science class in 10th grade and we are using the VERY old turbo C++ 3.0 and its been about 5 months sence i have been in the class, i desided instead of always staying after school to finish a problem in that class, i will just buy the program at... http://shop.borland.com/dr/v2/ec_MAIN.Entry10?SP=10023&PN=1&V1=640972&xid=39696&CID=0&DSP=&CUR=840&PGRP=0&CACHE_ID=0 ... and get a 3 for 1 deal, it also include the turbo C++ 3.0 we are using...


NOW for the problem im having, after having trouble installing 3.0 (took a while becuase i had trouble in the prompt to install it but finaly after a while i did install 3.0)

and i was setting my program up.... it looked like this....

//comment section
//bruce
//shell
//block7
//Library
#include<conio.h>
#include<iomanip.h>
#include<iostream.h>
#include<apstring.h>
#include<apvector.h>
#include<apmatrix.h>
//const section
//Var Section
apvector < apstring > Names( 20 );
apvector < apstring > Names2( 20 );
int I;
int Count;

void Main()
{
do
{
clrscr();
cout << "enter 20 names into the screen OR untill you press ZZZ" << endl;
getline( cin, Names[Count] );
Count++;
}
while ( Names[Count - 1] != "ZZZ" && Count < 20 );

clrscr();
if ( Count < 20 )
Count = Count - 2;

For( I = 0; I < Count + 1; I++ ) cout << Names[I].length() << endl;
}
its not the hole project i have to do, but basicly thats it for now, and the problem im having is that the program cant find the file for #include<apstring.h>
#include<apvector.h>
#include<apmatrix.h>

i quote its words
"unable to open include file 'apstring.h'"
"unable to open include file 'apvector.h'"
"unable to open include file 'apmatrix.h'"


and thus becuase of that it cant understand

apvector < apstring > Names( 20 );
apvector < apstring > Names2( 20 );

i need to know... is there somthing i need to install (or download) to get the <ap(blah blah).h> to work?
please help

nukem
12-07-05, 10:30 PM
First of all, why did you buy a compiler? There are many free compiles that work better if not the same. I personally use gcc (http://gcc.gnu.org/). Anyway the reason it is giving you those errors are because the compiler is when ever you have a header file with quotations around it the compiler looks in the same directory your project is saved then additional directories such as the header directory that comes with your compiler or any other directory that you tell it to look in. Those header files are not standard, I think you are looking for string,h vector.h, and matrix.h. If you want the ap versions then you need to goto your teacher and ask for them, put them in the same directory as your application. Also why are your varibles defined globaly? You really should have them only defined within a function, the 'F' in For should be lower case, and please learn how to write neat code.

learningbasics
12-08-05, 12:06 AM
First of all, why did you buy a compiler? There are many free compiles that work better if not the same. I personally use gcc (http://gcc.gnu.org/). Anyway the reason it is giving you those errors are because the compiler is when ever you have a header file with quotations around it the compiler looks in the same directory your project is saved then additional directories such as the header directory that comes with your compiler or any other directory that you tell it to look in. Those header files are not standard, I think you are looking for string,h vector.h, and matrix.h. If you want the ap versions then you need to goto your teacher and ask for them, put them in the same directory as your application. Also why are your varibles defined globaly? You really should have them only defined within a function, the 'F' in For should be lower case, and please learn how to write neat code.

i got this one becuase this is exactly what we use at school, so the code is exactly the same, i found out a sight that could download the ap(blah blah).h and a ap(blah blah).cpp and put it in, now i got it to work , but i have a diffrent error, its saying that it cant find the folder (in lines were the #include<apvector.h> and the #include<apmatrix.h> is) <iostream.h>

i am not really worrying about apmatrix, because the program i need to use is with the apvector.h (also i want to use turbo C++ 3.0 because its what i use in class and i want to use the exact same code with both, so i dont need to know 2 diffrent codes, and what not (basicly not to get me to confused because i already get confused to much))