Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 |
src/Vector2.cpp: In member function »float WoRD::Vector2::length()«: src/Vector2.cpp:33: Fehler: »sqrtf« ist kein Element von »std« src/Vector2.cpp: In member function »float WoRD::Vector2::angle(const WoRD::Vector2&)«: src/Vector2.cpp:53: Fehler: »acosf« ist kein Element von »std« src/Vector2.cpp:54: Fehler: »sqrtf« ist kein Element von »std« Process terminated with status 1 (0 minutes, 1 seconds) 3 errors, 0 warnings |
Zitat von »"cplusplus.com"«
- wchar_t is a fundamental type in C++ and therefore does not appear as a defined type in the corresponding header files where it appears in C. The same applies to several macros introduced by ammendment 1 to ISO C in the header file <iso646.h>, which are keywords in C++.
- The following functions have changes in their declarations related to the constness of their parameters: strchr, strpbrk, strrchr, strstr, memchr.
- The functions atexit, exit and abort, defined in <cstdlib> have additions to their behavior in C++.
- Overloaded versions of some functions are provided with additional types as parameters and the same semantics, like float and long double versions of the functions in the cmath header file, or long versions for abs and div.
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 |
src/Vector2.cpp: In member function »float WoRD::Vector2::length()«: src/Vector2.cpp:33: Fehler: »sqrt« ist kein Element von »std« src/Vector2.cpp: In member function »float WoRD::Vector2::angle(const WoRD::Vector2&)«: src/Vector2.cpp:53: Fehler: »acos« ist kein Element von »std« src/Vector2.cpp:54: Fehler: »sqrt« ist kein Element von »std« Process terminated with status 1 (0 minutes, 0 seconds) 3 errors, 0 warnings |
C-/C++-Quelltext |
|
1 |
float Vector2::length() const { return std::sqrt(static_cast<float>(m_size)); } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 |
#include <cmath> #include <iostream> int main (int, const char**) { std::cout << "sqrt (2) = " << std::sqrt (2.0f) << ", sin (1) = " << std::sin (1.0f) << ", asin (1) = " << std::asin (1.0f) << std::endl; return 0; } |
Zitat von »"rklaffehn"«
Ich muss wohl mal wieder in den Standard schauen, wie das definiert ist.
C-/C++-Quelltext |
|
1 |
int main();
|
C-/C++-Quelltext |
|
1 |
int main( int argc, char* argv[] ); |
Werbeanzeige