visual c++ - Error: argument of type "cons char *" is incompatible with parameters of type "LPCWSTR" -
i writing code in visual c++ access serial port of computer.
code given below:-
#include<windows.h> #include<stdio.h> #include<cstring> #include<string.h> #include<conio.h> #include<iostream> using namespace std; //#include "stdafx.h" #ifndef __capstone_cross_serial_port__ #define __capstone_cross_serial_port__ handle hserial= createfile("com1", generic_read | generic_write,0,0,open_existing,file_attribute_normal,0);
in above code getting error @ ""com1"" in lastly line of above code.
error given below:-
error: argument of type "cons char *" incompatible parameters of type "lpcwstr"
i want know why getting error , resolve it.
visual-c++
No comments:
Post a Comment