I'm using VC++ Express. And I think I know how to build the executable, but I'm getting these errors:
1>.\comport.cpp(163) : error C2664: 'strlen' : cannot convert parameter 1 from 'TCHAR [255]' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\comport.cpp(166) : error C2664: '_strnicmp' : cannot convert parameter 1 from 'TCHAR [255]' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\comport.cpp(383) : error C2664: 'strlen' : cannot convert parameter 1 from 'LPCTSTR' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>Generating Code...
1>Build log was saved at "file://c:\Users\Raj\Documents\ECE 4A\FYDP\TI Transceiver\GUI\release\BuildLog.htm"
1>sensMon - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
1>.\comport.cpp(163) : error C2664: 'strlen' : cannot convert parameter 1 from 'TCHAR [255]' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\comport.cpp(166) : error C2664: '_strnicmp' : cannot convert parameter 1 from 'TCHAR [255]' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\comport.cpp(383) : error C2664: 'strlen' : cannot convert parameter 1 from 'LPCTSTR' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>Generating Code...
1>Build log was saved at "file://c:\Users\Raj\Documents\ECE 4A\FYDP\TI Transceiver\GUI\release\BuildLog.htm"
1>sensMon - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
To copy to clipboard, switch view to plain text mode
I believe I need to typecast a lot of these variables before sending them into the functions. Anyone know how to typecase TCHAR [255] to const char*?
Thanks
Bookmarks