hello,
I have a scanner that I need to tweak. This one section scans a line and I need it to delete what ever it takes in if its between the comment sign. { delete this}. here is the block of code that I messing with.
Is there a get and delete in ifstream? I couldn't find anything online. can I set "ch" to null?Code:else if( ch == '{' ) { ch = rfile.get(); tokenIndex = 0; while(ch != '}' && ! rfile.eof () ) { tokString[ tokenIndex ++ ] = ch; ch = rfile.get(); } tokString [ tokenIndex ] = 0; ch = rfile.get(); currentToken = OUTPUT; }