Someone please help with my c++ code (I am beginner :() | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Someone please help with my c++ code (I am beginner :()

So this is my code #include <iostream> int main() { //start std::cout << "Welcome to the volume calculator for rectangles and squares!\n\n\n"; int height; std::cout << "Inter Height: "; std::cin >> height; std::cout << "\n"; int width; std::cout << "Inter Width: "; std::cin >> width; std::cout << "\n"; int length; std::cout << "Inter Length: "; std::cin >> length; std::cout << "\n"; int volume = width * height * length; std::cout << "The volume is: " << volume; return 0; } Whenever I try to run it,it just shows: Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation I am so confused. UPDATE: Thank you everyone for your answers. It turns out there was a problem with my IDE but now it is fixed.

16th Nov 2019, 6:39 PM
Alexander Zousky
3 Answers
+ 1
https://code.sololearn.com/cXOh0tUYySuA/?ref=app The code runs fine in the playground. Please check that all braces ( { } ) have a counterpart. and are in the right place. Make sure you have a main method in your program And check all semicolons and everything that ace and kit have said keep coding, keep asking, you are doing well
16th Nov 2019, 8:58 PM
sneeze
sneeze - avatar
0
Why don't you use ' using namespace std ' , Perhaps this help you and fixed the problem !!
18th Nov 2019, 1:09 AM
Saif Al-Hussain
Saif Al-Hussain - avatar
0
im also new
23rd Nov 2019, 6:07 PM
doonv
doonv - avatar