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 IamaSherpa 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. bilbobaggio

    problem printing array member data from a derived class

    Thanks again for the help. I figured out how to do the dynamic array. I needed an A** arrray. here is my main code void main(void) { int size; cout << "Enter size of the array << "; cin >> size; A** array; array = new A*[size]; int i; for (i=0; i<size; i++) array[i] = new B; for...
  2. bilbobaggio

    problem printing array member data from a derived class

    thanks for the help. the above code works for constant array size. however it gives an error when trying to delete the array. Also, I would like to have a dynamic array size. When using new it seems that the array is of type A and not A* so A::print gets called instead of B::print. Also when I...
  3. bilbobaggio

    problem printing array member data from a derived class

    I am having trouble with inheritance. here is a code sample. when i run the program it displays the first B object (ie the array of integers) but then i get an access violation. can anybody let me know what i am doing wrong? when i only create a pointer to a single B object it works fine. but...
  4. bilbobaggio

    Problem Linknig when using templates

    I am getting a linker error whe nusing templates. If i remove the templates from the following sample and make the num member of A an int by default i get no error. I have header file (A.h): template <class T> class A { public: A(): num(1) {} ~A() {} void print(); private: T...
  5. bilbobaggio

    Removing lines drawn on a dialog window

    Hi, In my MFC app I have a button which when clicked draws a few lines in the dialog window. If the button is re-clicked i need the previously drawn lines to be erased before drawing new ones. How do I accomplish this? Thanks
  6. bilbobaggio

    link error when using jni

    myClass.h is : class myClass { private: int num; public: myClass(); ~myClass() {} int getNum(); }; myClass.cpp is : #include "myClass.h" myClass::myClass() { num = 7; } int myClass::getNum() { return num; } When the two files are separate as shown here i get the error. However...
  7. bilbobaggio

    link error when using jni

    Hi, I have a class called myClass and i compile for use with jni using the following 'cl -Ic:\program*\Java\jdk1.5.0_01\include -Ic:\program*\Java\jdk1.5.0_01\include\win32 -LD myClassImpl.cpp -FemyClass.dll' myClassImpl.cpp implements the native call to getNum. class myClass { private...

Part and Inventory Search

Back
Top