Record Detail

Compile Error

prepare (1/3): 
finished

cmake (2/3): 
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /out/build
finished

make (3/3): 
Scanning dependencies of target P3
[ 33%] Building CXX object CMakeFiles/P3.dir/main.cpp.o
[ 66%] Building CXX object CMakeFiles/P3.dir/parkinglot.cpp.o
/in/parkinglot.cpp: In member function 'void vehicle::arrivaltime()':
/in/parkinglot.cpp:39:5: error: 'localtime_s' was not declared in this scope
     localtime_s(atime,&artime);
     ^~~~~~~~~~~
/in/parkinglot.cpp:39:5: note: suggested alternative: 'localtime_r'
     localtime_s(atime,&artime);
     ^~~~~~~~~~~
     localtime_r
/in/parkinglot.cpp: In member function 'void vehicle::departuretime()':
/in/parkinglot.cpp:44:5: error: 'localtime_s' was not declared in this scope
     localtime_s(dtime,&detime);
     ^~~~~~~~~~~
/in/parkinglot.cpp:44:5: note: suggested alternative: 'localtime_r'
     localtime_s(dtime,&detime);
     ^~~~~~~~~~~
     localtime_r
/in/parkinglot.cpp: In member function 'virtual char* van::getType()':
/in/parkinglot.cpp:137:12: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     return "van";
            ^~~~~
/in/parkinglot.cpp: In member function 'virtual char* car::getType()':
/in/parkinglot.cpp:145:12: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     return "car";
            ^~~~~
/in/parkinglot.cpp: In member function 'virtual char* motorbike::getType()':
/in/parkinglot.cpp:153:12: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     return "motorbike";
            ^~~~~~~~~~~
/in/parkinglot.cpp: In member function 'virtual char* bicycle::getType()':
/in/parkinglot.cpp:162:12: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     return "bicycle";
            ^~~~~~~~~
/in/parkinglot.cpp: In member function 'int Parkinglot::wheretopark(vehicle*)':
/in/parkinglot.cpp:247:13: error: 'sprintf_s' was not declared in this scope
             sprintf_s(itc, "Please park your car to Floor:%d", i + 1);
             ^~~~~~~~~
/in/parkinglot.cpp:247:13: note: suggested alternative: 'sprintf'
             sprintf_s(itc, "Please park your car to Floor:%d", i + 1);
             ^~~~~~~~~
             sprintf
CMakeFiles/P3.dir/build.make:86: recipe for target 'CMakeFiles/P3.dir/parkinglot.cpp.o' failed
make[2]: *** [CMakeFiles/P3.dir/parkinglot.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/P3.dir/all' failed
make[1]: *** [CMakeFiles/P3.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

build failed

Information

Submit By
Type
Submission
Homework
Project 3 Part 1 compilation test
Language
CMake
Submit At
2019-12-15 23:38:57
Judged At
2019-12-15 23:38:57
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes