Menu

apstring.h

2002-06-24
2012-09-26
  • Nobody/Anonymous

    i am a beginner.. i was wondering if this program has apstring library built into it.. or is there a new library that i have to use.. according to the book i have .. it says i have to use apstring.h

    example

    #include <iostream.h>
    #include "apstring.h
    int main ()
    {
    apstring name;     //input sisters name

     
    • Nobody/Anonymous

      I don't know of apstring, what does apstring do? There is probably a full replacement in the library.

       
    • Nobody/Anonymous

      You can use the C++ String class, it works more or less just like the AP version.

      Here's what you'd do for a simple Hello World program that uses a C++ string:

      #include <string>        //Notice no .h just string
      #include <iostream>
      using namespace std;

      int main()
      {
        string Message = "Hello, World!";
        cout << Message << "\n";
      }

       
    • Nobody/Anonymous

      If you're really desperate to use the AP classes (APString, APVector, etc.) you can download them on this page:

      http://www.collegeboard.com/ap/students/compsci/classes.html

      Then just copy all of the files into your include directory, which is a sub directory of the Dev C++ dir, (e.g. C:\Dev C++\Include). Now I think this alone will let you use the templated AP classes without any problem (e.g APVector), but for the non templated ones you might have the copy the .cpp file for the AP class you want to use into your projects directory and include it in the project.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.