Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

gcc HEAD 13.0.0 20220526 (experimental)

Options
Warnings
Don't Use Boost
C++17
-pedantic-errors
Raw compiler options
-Warray-bounds

names.txt

$ g++ prog.cc -Wall -Wextra -std=c++17 -pedantic-errors -Warray-bounds
44 names.tellg() = 0
23 count = 1
24 names.tellg() = 13
23 count = 2
24 names.tellg() = 27
23 count = 3
24 names.tellg() = 40
23 count = 4
24 names.tellg() = 53
23 count = 5
24 names.tellg() = -1
47 lineCount = 5
31 randomNum = 4
33 names.tellg() = -1
35 names.tellg() = -1
Exit Code:
0