Page 1 of 1

1294 - Mini-Spreadsheet

Posted: Thu Sep 04, 2014 10:04 pm
by brianfry713
Use this thread to discuss this problem.

Re: 1294 - Mini-Spreadsheet

Posted: Fri Jun 09, 2017 11:53 pm
by pointless0
According to my assert() logic, I am not processing all input.

Code: Select all

    for (row = 1; row <= 10; ++row) {
        row_ids["r" + number[row]] = row;
        row_ids["R" + number[row]] = row;
    }

    while (std::cin >> token) {
        if (row_ids.count(token) == 1) {
            //...read 10 cells worth of content
        }

        // THIS ASSERT causes fault
        else assert(false); // not row id
    }
Using other asserts, each cell's input agrees with the input spec as I understand it. If anyone can process all input without skipping anything, that would be good to know...