Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gregbackus

    void * to class

    say you have a file like this... #define CASTING_IS_A_BEAR 200 #include <string.h> #include <iostream.h> class thing { public: char name[32]; thing() { strcpy(name,&quot;greg&quot;); } }; int main(void) { void *p; thing g; p=(void*)g; /* now how do I get to...
  2. gregbackus

    templates and linking

    Nope. I'm not using STL - I'm trying to code a vector class from scratch. Borland 4.52 is pre-ANSI-standard, pre namespace even. Perhaps I am just a glutton for punishment, using this old version, but I'm a creature of habit. I'll try to show this in a simplified form...
  3. gregbackus

    templates and linking

    well, the undefined symbols are whatever functions are called in main(). The class has a constructor and a destructor, an insert() and remove() and a resize(), among others. What ever function that is a memeber of vector<T> that is called from main() causes the link to fail. I have used all...
  4. gregbackus

    templates and linking

    I'm new to this site and I love it already! Anyway - down to business - I'm using 4.52, coding a vector class using templates (template<class T> class vector) I've got a header that contains only the declarations of the class and its functions and a seperate file with the function definitions...

Part and Inventory Search

Back
Top