C#
byte 배열
안녕1999
2020. 5. 20. 13:32
c언어처럼 하면 에러남
byte Send_Data[20];
error CS0270: 변수 선언에는 배열 크기를 지정할 수 없습니다. 'new' 식을 사용하여 초기화하십시오.
error CS0270: Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)
올바른 코드
byte[] Send_Data = new byte[20];
private void DEBUG_puts(char *s)
error CS0214: Pointers and fixed size buffers may only be used in an unsafe context
올바른 코드
private void DEBUG_puts(char[] s)
m_file[0]=0;
error CS0031: Constant value '0' cannot be converted to a 'char'
올바른 코드
m_file[0]=(char)0;