Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
数値の長さを整数で取得するにはどうすればよいですか? この場合、while ループで使用しています。では、フロートの長さで何かを取得するにはどうすればよいですか?
使用sizeof():
sizeof()
float f = 123.0f; for (unsigned i = 0; i < sizeof(f); i++) { ... }
それとも、変数内の値の長さを意味していたのでしょうか?
float f = 123.0f; for (float i = 0.0f; i < f; i += 1.0f) { ... }