home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13194 < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.3 KB  |  61 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!news.duc.auburn.edu!eng.auburn.edu!tdukes
  3. From: tdukes@eng.auburn.edu (Todd J Dukes)
  4. Subject: Borland BIDS Library
  5. Message-ID: <tdukes.920901182152@alva.ee.eng.auburn.edu>
  6. Sender: Todd Dukes
  7. Nntp-Posting-Host: alva.ee.eng.auburn.edu
  8. Organization: Auburn University Engineering
  9. Date: Tue, 1 Sep 1992 23:21:52 GMT
  10. Lines: 49
  11.  
  12. I have been using the Borland Object based container classes. I am 
  13. starting a new project and thought it would be a good time to change 
  14. over to the template based container classes.
  15.  
  16. So far I haven't had much luck. I am just trying to insert a pointer
  17. to a class into a list. I can get the same program to compile if I
  18. just make a list of int, but it will not work for a simple class.
  19. The following is a short program that I can't get to compile. I get
  20. the following error:
  21.  
  22. \borlandc\classlib\include\listimp.h 502: Illegal structure operation
  23.  
  24.  
  25. Am I doing something wrong or are the BIDS libraries useless?
  26. (My guess is the former.:)
  27.  
  28. I am using BC++3.1 w/AF
  29.  
  30.  
  31. thanks
  32.  
  33. Todd Dukes
  34.  
  35. /* attempt to use BI_ListImp */
  36.  
  37. #include <listimp.h>
  38.  
  39. class point
  40. {
  41.     public:
  42.         int x;
  43.         int y;
  44.     point(int nx, int ny)
  45.     {
  46.         x = nx;
  47.         y = ny;
  48.     }
  49. };
  50.  
  51. void main()
  52. {
  53.     BI_IListImp<point> PointList;
  54.  
  55.     point * pp = new point(1,1);
  56.  
  57.     PointList.add(pp);
  58.  
  59. }
  60.  
  61.