Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Wide string conversion with multibyte chars
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 #include <iostream> int main() { wchar_t* pInput = L"123 Środa"; char pOutput[256] = { '\0' }; size_t bytesConverted = 0; size_t ret = wcstombs_s(&bytesConverted, pOutput, sizeof(pOutput), pInput, sizeof(pOutput) - 1); std::cout << "ret = " << ret << ", bytesConverted = " << bytesConverted << std::endl; std::cout << pOutput << std::endl; }
cl.exe
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 1,74 sec, absolute running time: 0,22 sec, absolute service time: 1,96 sec
edit mode
|
history
|
discussion
ret = 42, bytesConverted = 0