Question: I have a test site which uses drupal webforms.

My register form has this following password fields. They are using the inbuilt "Password field" type

[![enter image description here](https://i.stack.imgur.com/ZUhgr.png)](https://i.stack.imgur.com/ZUhgr.png)

When I look in my MySQL db I can see the passwords in plaintext in the webform\_submitted\_data table.

What did I miss to allow this to happen?

Thanks

Answer: 
Running the code you posted with the given input yields the exact same results for me. Taking your input and converting it to ASCII code gives the following output 

```
49 49 50 50 97 97 97 98 98 98 99 99 99 99 42 42 42 10 10 

```

The last two `10` are the newline characters that are being printed out
`cout << c << endl;` well, you are printing new lines (`std::endl` inserts a new line character specific to the current OS). So it isn't surprising that there are new line characters in the output. Remove the `<< endl` part of that line and you will get exactly what you want :)

Edit: Just noticed that you only what to remove the two new line chars at the end. In this case: The line "Program ended with exit code: 0", as well as the two new line chars before that are not printed by your program at all (or at least not from what you've posted here) - I've even tested your code and it prints exactly what you want in my case. 

If it's printed by whatever executes your program (for example your IDE), you can't really do anything about that, except running without that program. However, if it is caused by something inside your code that you haven't posted here, you can only fix it by changing that part of your code. There is now way you could prevent something to be printed without preventing that specific call to `cout` (or whatever is used to print a that text) in the first place.