IT/Software 2018. 8. 28.
[코딩] #define에 관한 이야기(#, ##, \)
#define에 관한 이야기(#, ##, \)[출처] #define에 관한 이야기(#, ##, )|작성자 봉이매크로를 만들 때만 사용할 수 있는 지시어가 있는데, 바로 ##과 \이다.##은 함수와 같은 매크로에서만 사용하는 것으로 두가지 인수를 연결시켜 버리는 기능을 한다.예를 들어#define MACRO(a, b) a##b이렇게 매크로를 만들었다고 하자. 프로그램에서 이 매크로를a = MACRO(First, Last);이렇게 사용했다면 실제로는 두 인수 First와 Last가 연결되어a = FirstLast;이렇게 되는 것이다.
IT/Software 2018. 8. 24.
arm mbed OS Network errors - 에러 코드
매번 찾기가 짜증난다..여기 기록.. Network errorsThe convention of the network-socket API is for functions to return negative error codes to indicate failure. On success, a function may return zero or a non-negative integer to indicate the size of a transaction. On failure, a function must return a negative integer, which should be one of the error codes in the nsapi_error_t enum (here):/** Enum of standardiz..