Thread: Class help
View Single Post
  #33 (permalink)  
Old 11-15-2007, 08:45 AM
Shaolin Shaolin is offline
Member
 
Join Date: Nov 2007
Posts: 37
Shaolin is on a distinguished road
Ah ha, great stuff as usual.

I have an issue with my increment. for my accno (account number) I want to increment the number by one for each customer. so I do this:

// outside class
private int accno1 = 0;

then in public account() I do this:

accno = accno1++;

But when I run the app all the customers IDs are the same value.
Reply With Quote