CS:APP Data Lab btest floatPower2 timed out
/* * floatPower2 – Return bit-level equivalent of the expression 2.0^x * (2.0 raised to the power x) for any 32-bit integer x. * * The unsigned value that is returned should have the identical bit * representation as the single-precision floating-point number 2.0^x. * If the result is too small to be represented as […]
Facing error : undefined reference idk why? everything is incuded
Here is the terminal that shows me? kindly if anyone know this
warning: relocation against _ZN7Student7counterE' in read-only section
.text’
/usr/bin/ld: /tmp/ccsORc5r.o: in function Student::Student()': Main.cpp:(.text+0x200): undefined reference to
Student::counter’
/usr/bin/ld: Main.cpp:(.text+0x209): undefined reference to Student::counter' /usr/bin/ld: /tmp/ccsORc5r.o: in function
Student::Student(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, char, int, int)’:
Main.cpp:(.text+0x2c5): undefined reference to Student::counter' /usr/bin/ld: Main.cpp:(.text+0x2ce): undefined reference to
Student::counter’
/usr/bin/ld: /tmp/ccsORc5r.o: in function Student::~Student()': Main.cpp:(.text+0x32a): undefined reference to
Student::counter’
/usr/bin/ld: /tmp/ccsORc5r.o:Main.cpp:(.text+0x333): more undefined references to Student::counter' follow /usr/bin/ld: /tmp/ccsORc5r.o: in function
Admin::addCourse()’:
Main.cpp:(.text+0xc8a): undefined reference to Course::Course()' /usr/bin/ld: Main.cpp:(.text+0xdaa): undefined reference to
Course::Course()’
/usr/bin/ld: Main.cpp:(.text+0xf39): undefined reference to Course::Course()' /usr/bin/ld: /tmp/ccsORc5r.o: in function
Admin::addTeacher()’:
Main.cpp:(.text+0x1395): undefined reference to Professor::Professor()' /usr/bin/ld: Main.cpp:(.text+0x147c): undefined reference to
Professor::Professor()’
/usr/bin/ld: Main.cpp:(.text+0x1610): undefined reference to `Professor::Professor()’
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status