Hi everyone, I am building a computer program in my free time that will hopefully become a full on program language translator. However right now all I am trying to do is parse a java file (any file would work though), and ignoring lines of code that would not work in C++, such as public static void..and so on. My problem is that I can only ignore one line at a time. The code is below, any help would be greatly appreciated.
Ok that's what I was thinking, but I kept getting stuck on how to get the whole length of the file. I know the function getFileSize() will give the byte size of the file, but I want to do it by counting the lines and returning that number into an integer. I can do it in Java, but havent found anything like that for c++