It is indeed pos = 1. It was 1 at one time then I tried to fix it in Spaces and that fix required 0, but it is easier and more reliable to fix in GetColumn. This is the shortest real life example I could find: CONSOLE_APP_MAIN { String s = "+ /* \n" " */ a"; CParser p(s); if (p.Char('+')) { Point z(p.GetLine(), p.GetPos().GetColumn()); Cout() << z.x << ", " << z.y << ": " << p.ReadId() << "\n"; } }
CONSOLE_APP_MAIN { String s = "+ /* \n" " */ a"; CParser p(s); if (p.Char('+')) { Point z(p.GetLine(), p.GetPos().GetColumn()); Cout() << z.x << ", " << z.y << ": " << p.ReadId() << "\n"; } }
Report message to a moderator