I currently have a .csv file containing three fields: user, password, type. For instance, my file looks like this:
michael, sun123, user
joseph, sierra7, user
isaac, apple2, sysop
I would like to read from such file and check if the user "isaac" is present in the list. So far, I was able to open the file and put every characters of my file into a 1D array called database[]. I have set a pointer pointing to the very first character of my database[] array. My question is: How do I manage to find "isaac" in the file?
My idea was to check if the first character of the user I am looking for matches a character in my array. If so, I begin to check the next characters as long as I don't hit a comma. When I hit a comma, I then check if there exits a password, a comma and a type before a carriage return using boolean. Is there an easier way of doing this?
Thanks in advance!