debugging error

Hey everyone. So I've been programming for about 6 months now. And I've reached a new error. I tracked the problem down to case 'T'. Specifically line 19.
This is the error I receive. If anyone could let me know what it means as well as what is wrong then thank you so much.

1
2
/tmp/ccynPDuE.o: In function `Account::Account()':
cs165asn11.cpp:(.text._ZN7AccountC2Ev[Account::Account()]+0x8): undefined reference to `vtable for Account'


If it helps:
Base Class:
Account
Subclasses:
S for Saving
C for Checking
L for Loan.

T is a function which processes the commands from the first array in list.
U updates applying interest rate/fees.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0void feedInLoop(Account *list[MAX])
1{
2  // scl
3  // point to new account type
4   switch (list[0]->inChar[list[0]->charIndex])
5    {
6    case 's':
7      list[list[0]->pIndex] = new Saving();
8      break;
9    case 'c':
10      list[list[0]->pIndex] = new Checking();
11      break;
12    case 'l':
13      list[list[0]->pIndex] = new Loan();
14      break;
15    case 'u':
16      list[list[0]->pIndex]->update();
17      break;
18    case 't':
19      list[list[0]->pIndex]->changes(list[0]->inNum[list[0]->numIndex]);
        list[0]->numIndex++;
        break;
        // default should only occur when the file reaches a false read
        // ie end of file
      default:
        exit ('0');
      }
    list[0]->charIndex++;
    if (charIndex < MAX)
       feedInLoop(list);
  }


Thanks Again :)
Last edited on
Found it was an incorrect setup for my virtual tables in the class itself :)
Topic archived. No new replies allowed.