나는 custom struct를 인수로 취하는 함수를 가지고있다. 논증이 무엇인지 알아 내려면 어떻게해야합니까? 나는 (... 목표 - C로 수입 C 라이브러리) 그것은 종류의 날짜 형식입니다 ...사용자 정의 구조체의 함수 인수를 찾아 낼 수 있습니까?
구조체 알고
typedef struct
{
/** The number of day in the hebrew month (1..31). */
int hd_day;
/** The number of the hebrew month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2). */
int hd_mon;
/** The number of the hebrew year. */
int hd_year;
/** The number of the day in the month. (1..31) */
int gd_day;
/** The number of the month 1..12 (1 - jan). */
int gd_mon;
/** The number of the year. */
int gd_year;
/** The day of the week 1..7 (1 - sunday). */
int hd_dw;
/** The length of the year in days. */
int hd_size_of_year;
/** The week day of Hebrew new year. */
int hd_new_year_dw;
/** The number type of year. */
int hd_year_type;
/** The Julian day number */
int hd_jd;
/** The number of days passed since 1 tishrey */
int hd_days;
/** The number of weeks passed since 1 tishrey */
int hd_weeks;
} hdate_struct;
기능 :
int
hdate_get_omer_day(hdate_struct const * h)
{
int omer_day;
hdate_struct sixteen_nissan;
hdate_set_hdate(&sixteen_nissan, 16, 7, h->hd_year);
omer_day = h->hd_jd - sixteen_nissan.hd_jd + 1;
if ((omer_day > 49) || (omer_day < 0))
omer_day = 0;
return omer_day;
}
이 함수를 호출하려고 시도했지만 날짜가 어떻게되는지 확신 할 수 없습니다. 줄리안 (Julian)을 히브리어 (Hebrew)로 변환하는 함수도 있습니다. 모두 동일한 구조체를 가져 오거나 반환합니다.
함수의 반환 값을 얻으려면 어떻게해야합니까?
예를 들면? _ – kennytm
"날짜에 무엇이 들어가는 지 확실하지 않습니다."라는 뜻입니까?
*h
또는sixteen_nissan
–@David - 기능이 저에게 원하는 것은 무엇입니까? 나는'* h '를 의미한다. – Moshe