when I compiled the code "matrix library in C", I got following similar error messages. So I did research and find the solution to it.
tchar is not defined
_tchar is undefined
Error C3861 'printf': identifier not found MatrixLib c:\demo_cpp\matrixlib\matrixlib\matlib.h 16
another error is:
‘RAND_MAX’ undeclared (first use in this function)
- Why do I receive this error when generating a random float?
- TCHAR vs _TCHAR
- Articles by Michael Dunn (Articles: 68)
- String handling
- CString Management
- The Complete Guide to C++ Strings, Part I - Win32 Character Encodings
- The Complete Guide to C++ Strings, Part II - String Wrapper Classes
- The Code Project Visual C++ Forum FAQ
- Some Time-Saving Commands and Key Remappings for the VC IDE
TCHAR and _TCHAR are identical, although since TCHAR doesn't have a leading underscore, Microsoft aren't allowed to reserved it as a keyword (imagine if you had a variable called TCHAR. Think what would happen). Hence TCHAR will not be #defined when Language Extensions are disabled (/Za).
TCHAR is defined in winnt.h (which you'll get when you #include
You've probably already read it, but just in case, the strings section of Codeproject has useful info.
No comments:
Post a Comment