일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
Tags
- #2차원배열
- html video
- docker example
- #JAVASCRIPT
- html id
- #자바상속#자바이즈어#is~a
- border-box
- #다차원포인터
- git flow
- #C++ 연산자함수오버로딩
- #성적관리프로그램
- relative path
- #android activity
- 토큰경제
- #C++ has~a
- html object
- #bubbleSort
- #3차원배열
- html charset
- #CallByAddress
- hyperledger transaction
- html multimedia
- html code
- #binary
- 하이퍼레저패브릭
- mac terminal command
- html plug-in
- html youtube
- #1차원배열
- html5 new tag
Archives
- Today
- Total
목록#strdup (1)
A sentimental robot
strdup함수 만들기
#include #include #include char * my_strdup(char *s) { int n; char *p; n = strlen(s)+1; // includes null character p = (char*)malloc(n); strcpy(p,s); return p; } void main() { char *p; p = my_strdup("HELLO"); printf("%s\n", p); free(p); p = my_strdup("Hi"); printf("%s\n", p); } #include #include #include void my_strdup(char **t, char *s) { int n; char *p; n = strlen(s)+1; p = (char *)malloc(n)..
C
2018. 1. 3. 09:22