일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- html multimedia
- relative path
- #android activity
- #bubbleSort
- #성적관리프로그램
- hyperledger transaction
- html code
- git flow
- docker example
- html youtube
- html5 new tag
- html charset
- #C++ 연산자함수오버로딩
- html id
- html object
- #다차원포인터
- #binary
- #CallByAddress
- #3차원배열
- #자바상속#자바이즈어#is~a
- html video
- border-box
- #JAVASCRIPT
- mac terminal command
- html plug-in
- 토큰경제
- #1차원배열
- #C++ has~a
- #2차원배열
- 하이퍼레저패브릭
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