As an addendum to @adelphus' answer, you can also use raw string literals to make things a little bit more readable maybe.
myPort = CreateFile(R"(\\.\COM14)",
GENERIC_READ | GENERIC_WRITE,
0, /* exclusive access */
NULL, /* no security attrs */
OPEN_EXISTING,
0,
NULL );
Although seeing as CreateFile()
is a macro that may resolve to CreateFileW()
you may also need to turn this into a wide string
myPort = CreateFile(LR"(\\.\COM14)",
GENERIC_READ | GENERIC_WRITE,
0, /* exclusive access */
NULL, /* no security attrs */
OPEN_EXISTING,
0,
NULL );
Applies here because the question is tagged C++ and requires as least C++11. Does not apply to C.