Replace input with “ * ” C++

前端 未结 4 892
春和景丽
春和景丽 2020-12-22 06:21

i want the user to input a passwort. of course it\'s a secret passwort so nobody should see it. so i tried to replace the letters and numbers the user inputs, with \' * \'.

4条回答
  •  无人及你
    2020-12-22 07:22

    strcpy(pwstring,pw);
    

    I'm guessing that pwstring is a std::string? strcpy is a c function, it acts on 'c' null terminated strings. You are providing it with a c++ string and an int.

提交回复
热议问题