I have an array of structs holding amongst other things a list of ip Addresses, these ip Addresses are the users on my system.
I want to convert these ip addreses to the names of my users. Since there are 50+ users on my system i would like to know if there is a better and hopefully shorter way than an if statement to change them. i Have
p.s A switch wouldn't work, and thats not much shorter anywayCode:if (db[i].ipAddress == "10.0.0.101") db[i].ipAddress = "A User" ; else if (db[i].ipAddress == "10.0.0.102") db[i].ipAddress = "A User" ; ......etc, etc
Thanks a lot