South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
use a char to loop through the entire file, progressing an index each time. Each time you encounter a quote, you toggle a flag that is checked for each loop and the program decides based on the flag whether or not to increment a variable. It all stops when you reach the end of the file.
nah...
use some findchar command, and find the first instance of ".
run a inner loop, which goes character for character till it finds another " (also incrementing a counter variable every loop)
replace those characters with something else, go through the process again...ie: loop it
answer = counter variable.
yours would work, easilly, but mine would be faster as it skips all the garbage, only counting when it finds a " character. but speed won't matter for a program with such small scope..LOL