Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 컴파일
- Realm
- web3js
- kotlin
- bigquery
- dataginding
- log
- porterduff
- LAYER_TYPE_SOFTWARE
- fabric-sdk-java
- convert
- test
- Exception
- hardwareacceleration
- 스트리밍
- Android
- error
- C
- null safety
- Glide
- firebase
- quick-start
- fabic
- Gradle
- ethereum
- vuepress
- 안드로이드
- coroutines
- Hyperledger
- 다윈
Archives
- Today
- Total
날마다 새롭게 또 날마다 새롭게
readline - 여러 개의 라인 문자열을 입력받는 함수 구현 코드(포인터 배열) 본문
/* readlines : read input lines */
int readlines(char *lineptr[], int maxlines)
{
int len, nlines;
char *p, line[MAXLEN];
nlines=0;
while(len=getline(line, MAXLEN))>0)
if(nlines >= maxlines || (p=alloc(len))==NULL)
return -1;
else {
line[len-1]='\0';
strcpy(p,line);
lineptr[nlines++]=p;
}
return nlines;
}
Comments