I’m looking through some c++ code that MATLAB generated and I came across this:
typedef char char_T
typedef char_T byte_T
What exactly is this code doing and what is its purpose?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What I think you’re asking is for the reason why MATLAB’s code generator is spitting out these seemingly superfluous typedefs. The probable reason being that MATLAB wants a type that represents bytes for its code, but it’s unsure of what that type is on your specific system and architecture. It then probably has a system-specific stub that maps its own types to something reasonable, and then a generic portion that uses those previously-established types.