D
D
Denis Anikin2020-09-22 19:14:44
C++ / C#
Denis Anikin, 2020-09-22 19:14:44

Why is setlocale(LC_ALL, "") needed in c++?

They started teaching programming at the university and I don’t understand why this line is needed, using the Hello world example, it does nothing, and so and so the text is displayed in Russian without errors

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Zhilin, 2020-09-22
@Rubl9

Usually, with such tricks, they try (in vain) to force the ancient Windows console to display Russian text. If you develop under MacOS or Linux, then this is useful, for example, for double input-output through a dot, and not through a comma, as it can be by default for the Russian locale.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question