/ Test /

Record Detail

Compile Error

Compile
cgroup
cli.cpp
cli.hpp
map.cpp
map.hpp
output
project1.cpp
Makefile
make.sh
make: Entering directory '/in'
g++ -std=c++17 -Wconversion -Wall -Werror -Wextra -pedantic -O3 -DNDEBUG -c project1.cpp
g++ -std=c++17 -Wconversion -Wall -Werror -Wextra -pedantic -O3 -DNDEBUG -c map.cpp
map.cpp: In function 'char door_to_button(char)':
map.cpp:88:19: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
     return (int)c + 32;
            ~~~~~~~^~~~
map.cpp: In function 'char button_to_id(char)':
map.cpp:105:19: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
     return (int)c - 96;
            ~~~~~~~^~~~
map.cpp: In function 'char id_to_button(char)':
map.cpp:112:19: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
     return (int)c + 96;
            ~~~~~~~^~~~
map.cpp: In function 'void output_map(const state&, const backtrack&, const map&, discovered&, unsigned int, unsigned int, unsigned int)':
map.cpp:377:30: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
     for (char l = (int)layer + 1; (unsigned int)l <= num_colors; ++l) {
                   ~~~~~~~~~~~^~~
cc1plus: all warnings being treated as errors
Makefile:62: recipe for target 'map.o' failed
make: *** [map.o] Error 1
make: Leaving directory '/in'

Information

Submit By
Type
Submission
Problem
281 Puzzle Solver
Language
GNU Make
Submit At
2023-09-04 23:46:51
Judged At
2023-09-04 23:46:51
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes