cl /EHsc /W4 /Ox /std:c++17 a.cpp Microsoft (R) C/C++ Optimizing Compiler Version 19.21.27702.2 for x64 Copyright (C) Microsoft Corporation. All rights reserved. a.cpp a.cpp(26): error C2065: 'feet': undeclared identifier a.cpp(26): error C2065: 'inches': undeclared identifier a.cpp(31): error C2146: syntax error: missing ';' before identifier 'Double' a.cpp(31): error C2065: 'Double': undeclared identifier a.cpp(31): error C2146: syntax error: missing ';' before identifier 'HeightSq' a.cpp(31): error C2065: 'HeightSq': undeclared identifier a.cpp(31): error C2065: 'totalHeight': undeclared identifier a.cpp(31): error C2065: 'totalHeight': undeclared identifier a.cpp(33): error C2371: 'BMI': redefinition; different basic types a.cpp(12): note: see declaration of 'BMI' a.cpp(33): error C2065: 'adjusted_weight': undeclared identifier a.cpp(33): error C2065: 'HeightSq': undeclared identifier a.cpp(35): error C2088: '<<': illegal for class a.cpp(37): error C2297: '<<': illegal, right operand has type 'const char [13]' a.cpp(37): error C2563: mismatch in formal parameter list a.cpp(37): error C2568: '<<': unable to resolve function overload a.cpp(37): note: could be 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)' |
int feet;
or double feet;
.
|
|
|
|
PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code. Along with the proper indenting it makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/ Hint: You can edit your post, highlight your code and press the <> formatting button. You can use the preview button at the bottom to see how it looks. I found the second link to be the most help. |