분류 전체보기
-
로또번호 생성기Programming/C,C++,C# 2007. 11. 21. 12:57
#include #include #include void main() { int lotto[6]={0,}; // 6개의 로또번호가 들어갈 배열 int count = 0; // 생성한 로또번호의 갯수 srand(time(NULL)); // 랜덤값 추출 // 6개의 로또번호를 추출할때까지 반복 while(count < 6) { int mFlag = 1; int number = 0; int i=0; // 1 ~ 45 사이의 로또번호를 얻는다. number = rand()%45+1; // 중복되는 로또번호가 있는지 확인한다. for(i=0; i
-
URL Encode/DecodeProgramming/C,C++,C# 2007. 11. 20. 21:07
URL 인코딩----------------------------------------------------------------------- void UrlEncode(const char *inStr, char *outStr) { int inStrLen; unsigned short asc; unsigned char c; int outIndex=0; int i=0; inStrLen = (int)strlen(inStr); for(i=0; i47 && asc64 && asc96 && asc '@' && *(inStr) < '[') num = (*(inStr) - 'A')+10; else num = (*(inStr) - 'a')+10; if((16*(1-i))) num = (num*16); retval += n..
-
strlen 사용시 주의사항Programming/C,C++,C# 2007. 11. 18. 23:13
strlen을 이용하여 문자열의 길이를 구하는 경우가 상당히 많다.. strlen을 이용하여 문자열 포인터로 길이를 구할때 주의해야 할 점이 있다.. char* str = NULL; int len = 0; len = strlen(str); 위와 같이 str이 NULL인 경우 프로그램은 그냥 죽어버린다. 원인은 strlen함수가 자체적으로 문자열이 널포인터인지를 검사하지 않기때문에 생기는 문제이다. 물론 위와 같이 NULL인 str의 길이를 구하려는 사람은 없지만.. 실질적으로 함수가 중간에 끼고 코드의 양이 커질때 위와 같은 문제를 만날때가 적어도 한번은 있을것이다.. 어쩌면 너무 쉽게 생각해서 그냥 지나치는 경우도 많다.. 아무튼 strlen을 사용할때는 문자열포인터가 널값이 아닌지를 꼭 한번 체크해주..
-
-
손에손잡고(Hand In Hand) 영어버전 (1988) -코리아나Etc./MusicVideo 2007. 11. 14. 23:29
Koreana - "Hand In Hand" See the fire in the sky We feel the beating of our hearts together This is our time to rise above We know the chance is here to live forever For all time Hand in Hand we stand All across the land We can make this world A better place in which to live Hand in Hand we can Start to understand Breaking down the walls That come between us for all time Arirang Everytime we giv..
-
-
Last Christmas (1985) - WhamEtc./MusicVideo 2007. 11. 13. 00:13
Last Christmas I gave you my heart 지난 크리스마스에 난 당신에게 제 마음을 고백했었죠 But the very next day you gave it away 하지만 다음날 당신은 제 마음을 거절했어요 This year to save me from tears 이젠 더이상 눈물 같은 건 흘리지 안도록 I'll give it to someone special 올해에는 정말 특별한 사람에게만 제 마음을 줄 거예요 Last Christmas I gave you my heart 지난 크리스마스에 전 당신에게 제 마음을 고백했었죠 But the very next day you gave it away 하지만 당신은 날 거절해 버렸어요 This year to save me from tears ..
-
Your Song (2001, 물랑루즈 中 ) - Ewan McGregorEtc./MusicVideo 2007. 11. 13. 00:06
My gift is my song.. 제 선물은 노래에요.. And this one's for you. 당신을 위해 부릅니다 And you can tell everybody that this is your song. 모두에게 말해도 좋아요.. 당신의 노래니까요.. It may be quite simple but now that it's done. 다 만들긴했는데 너무 단순할지도 모르겠어요.. Hope you don't mind, I hope you don't mind. 당신 맘에 들었으면 좋겠어요.. That I put down in words. 글로 쓴 제 마음이.. How wonderful life is now you're in the world. 당신이 있는 이 세상이 얼마나 아름다운지 모릅니다 S..