Update file

Hey guy! I have 4 data in file like below

ID Name Sex Phone Salary
1 example example example example
2 example example example example
3 example example example example
4 example example example example

I want when I delete data(ID 1)
ID 2 auto change to ID 1
ID 3 auto change to ID 2
ID 4 auto change to ID 3

I try,but not like i want.
Please help me guy.
the id could the index in a vector container . it would be updated on insertion or removal for instance
Assuming ID is a int, if not change it to an int before you subtract.

outputfile >> ID-1 >> " " >> example" " >> example" " >> example" " >> example;
Thanks guy i done it.
Topic archived. No new replies allowed.