검색결과 리스트
분류 전체보기에 해당되는 글 46건
- 2013.04.10 [1주차] c언어 기본
- 2013.04.04 04/04 (외국어 공부 script)
- 2013.04.04 Chapter 7. Deadlock
- 2013.04.04 chapter 6. Process Syncronization
- 2013.04.04 2. [Example] Input-Event
- 2013.04.04 1. [Example]message
- 2013.04.02 2. 형, 연산자,수식
- 2013.04.02 [2주차] Queue & Tree
- 2013.04.02 [2주차] Tree복습, 정렬 알고리즘
- 2013.04.01 03/28 (음악 감상관련 Script)
글
< c 포인터의 기본 개념 >
1. 포인터
1 - 1 포인터와 증가연산자
*++p
*p++
++*p
(*p)++
1 - 2 const 의 위치에 따른 차이점
int * pi;
const int * pi;
int * const pi;
const int * const pi;
1 - 3 배열과 포인터의 차이점
1. char str[43] = "apple";
2. char str[43];
str = "apple";
3. char* str = "apple";
4. char* str;
str = "apple";
2. 배열과 포인터의 할당 방법
2 - 1 포인터
int main(int arc, int **argv){ char* pc = (char*)malloc(5*sizeof(char)); int size_char = sizeof(char); printf("char = %d\n",size_char); free(pc); return 0; }
2 - 2 배열
int main(int arc, int **argv){ int len; printf("배열의 크기"); scanf("%d",&len); int array[len]; }
2 - 3 calloc과 malloc
int *arrays; int len; int i=0; printf("배열의 크기"); scanf("%d",&len); arrays = (int*)malloc(sizeof(int)*len); memset(arrays, '0', len); //arrays = (int*)calloc(sizeof(int)*len);
2 - 4 배열을 가르키는 포인터
int main(int arc, int **argv){ int col = 0, row= 0; int a[3][3] = {{1,2,3},{10,20,30},{100,200,300}}; int (*pa)[3]; pa = a; }
2 - 5 void형 포인터
void (*pf)(void);//매개변수가 없고 반환값도 없는 함수포인터 void one(){ printf("one"); } void two(){ printf("two"); } void main(){ pf = one; pf(); pf = two; pf(); }
2 - 6 함수를 가르키는 포인터
void (*pf)(int*,int*); void change(int* a, int* b){ int temp = *a; *a = *b; *b = temp; } void main(){ int a = 3; int b = 4; pf = change; pf(&a,&b); printf("%d,%d",a,b); }
'Tip & Tech > 적절한관계' 카테고리의 다른 글
[2 - 2 주차]트리, 힙 구현과 탐색 (0) | 2013.04.10 |
---|---|
[2 - 1 주차] 포인터를 이용한 리스트 (0) | 2013.04.10 |
트랙백
댓글
글
외국어 공부 script
Question]
You may study a foreign language. How did you begin to learn a foreign language and how have you been learning it so far?
Answer]
Yes, I am now studying English. I began studying due to the fact that my family and I will be having vacation in England next year. We are going to stay there for two months and knowing how to speak and understanding the language will be helpful. I also found their language very interesting. I enrolled for a English class in Seoul and I have private tutorials every Friday and Saturday night. I am learning English vocabularies and pronunciation nowadays. It is really tough but really exciting. I just had my greeting lesson in English yesterday.
Question]
If you lean another foreign language in the near future, what language would you like to learn? Can you tell me why you want to learn it?
Answer]
I would want to learn French. I think the language is very intricate but it is fun to learn. I have a friend who speak French and whenever she talks in French, I find it very cool. I also learned that French is the most widely spoken language int the world that makes me want to learn it even more. For me, a language is very important and knowing how to speak in different languages is very beneficial. Maybe after learning French, I would study German, only because I would want to learn more about their history and culture.
Question]
You may study a foreign language. While learning the foreign language, have you experienced any difficulties? if so, tell me about them in detail.
Answer]
Yes, I've had remarkable and complex experience while studying a foreign tongue. I once practiced interviewing in english. My teacher gave me the format to follow and the copy of the words to say. We practiced the pronunciation and intonation of the words. it was really fun hearing myself speaking in a foreign language. The difficult part was studying the articulation because English language has different sound, like their pronunciation of the vowel "e", a beginner will invariably have trouble distinguishing one tone from another. It's confusing but I think just have to practice and study. I tried to correct my mistakes in English as my teacher helped me by making me repeat the words he uttered.
'OPIC' 카테고리의 다른 글
08/01 (가족 & 집 역할 연기 관련 script) (0) | 2013.08.02 |
---|---|
7/18 (스포츠 콘서트 관련 Script) (0) | 2013.07.19 |
03/28 (음악 감상관련 Script) (0) | 2013.04.01 |
03/24 (인터넷 서핑관련) (0) | 2013.03.24 |
3/21 (학교 관련 script) (0) | 2013.03.23 |
트랙백
댓글
글
'Tip & Tech > 운영체제 뽀개기' 카테고리의 다른 글
chapter 6. Process Syncronization (0) | 2013.04.04 |
---|---|
chapter 5. CPU Scheduling (0) | 2013.03.26 |
chapter 4. Thread (0) | 2013.03.26 |
Chapter 3. Process (0) | 2013.03.21 |
chapter 2. Operating System Structure (0) | 2013.03.21 |
트랙백
댓글
글
'Tip & Tech > 운영체제 뽀개기' 카테고리의 다른 글
Chapter 7. Deadlock (0) | 2013.04.04 |
---|---|
chapter 5. CPU Scheduling (0) | 2013.03.26 |
chapter 4. Thread (0) | 2013.03.26 |
Chapter 3. Process (0) | 2013.03.21 |
chapter 2. Operating System Structure (0) | 2013.03.21 |
트랙백
댓글
글
이번 글에서는 NaCl 모듈의 입력 이벤트 처리 및 포커스 변경에 관해서 포스팅을 하려고 합니다.
이 글은 (https://developers.google.com/native-client/dev/devguide/coding/input-events?hl=ko)
여기 위에 있는 설명을 제 방식으로 해석하여 올리는 글이니 위의 과정을 참고하여 하셔도 무방합니다.
제가 초점을 맞추는 부분은 어떻게 해야 키보드와 마우스의 Input값이 html에서 NaCl로 전달되고, 그 전달된 것을 받아 처리하여 html에서 어떻게 보여줄지에 관한 것입니다.
시작하겠습니다.
사용자의 입력장치로 입력하면 브라우저에 입력 이벤트가 발생합니다!
Native Client 애플리케이션에서는 모듈 인스턴스와 사용자 상호작용에 따라서도 입력 이벤트가 발생하여 모듈에 전달됩니다.
Native Client 모듈은 pp:instance 클래스의 특정 함수를 재정의하여 입력 및 브라우저 이벤트를 처리할 수 있습니다.
함수 | 이벤트 | 용도 |
---|---|---|
DidChangeView() | 브라우저에서 모듈 인스턴스의 위치, 크기 또는 클립 직사각형이 변경되었을 때 호출됩니다. 브라우저 창의 크기를 조정하거나 마우스 휠을 스크롤해도 이 이벤트가 발생합니다. | 이 함수의 구현에서는 모듈 인스턴스 직사각형의 크기가 변경되었는지 여부를 확인하고 크기가 달라진 경우 그래픽 컨텍스트를 재할당할 수 있습니다. |
DidChangeFocus() | 브라우저에서 모듈 인스턴스가 포커스를 얻거나 잃었을 때 호출됩니다(일반적으로 모듈 인스턴스 내부나 외부를 클릭한 경우). 포커스를 얻으면 키보드 이벤트가 모듈 인스턴스로 전송됩니다. 인스턴스의 기본 상태는 포커스를 갖지 않는 상태입니다. | 이 함수의 구현에서는 애니메이션 또는 커서 점멸을 시작하거나 중지할 수 있습니다. |
HandleDocumentLoad() | DOMWindow 탐색의 MIME 유형에 따라 인스턴스화된 전체 프레임 모듈 인스턴스의 Init() 이후에 호출됩니다. 이러한 상황은 특정 MIME 유형을 처리하도록 미리 등록된 모듈에만 적용됩니다. 특정 MIME 유형을 처리하도록 등록하지 않았거나 이러한 상황에 해당하는지 확실하지 않은 경우 단순히 false를 반환하도록 함수를 구현할 수 있습니다. | 이 API는 Chrome 웹 브라우저의 기능을 개선하는 확장 프로그램을 작성할 때만 사용됩니다. 예를 들어 PDF 뷰어에서 이 함수를 구현하여 PDF 파일을 다운로드하여 표시할 수 있습니다. |
HandleInputEvent() | 사용자가 마우스 또는 키보드와 같은 입력장치로 브라우저의 모듈 인스턴스와 상호작용할 때 호출됩니다. 이 함수를 재정의하려면 마우스 이벤트의 경우RequestInputEvents() , 키보드 이벤트의 경우RequestFilteringInputEvents() 를 사용하여 입력 이벤트를 수용하도록 모듈을 등록해야 합니다. | 이 함수의 구현에서는 입력 이벤트 유형을 확인하여 적절한 처리로 분기합니다. |
DidChangeFocus()
모듈 인스턴스의 외부나 내부를 클릭하면 DidChangeFocus()
가 호출됩니다. 모듈 인스턴스가 포커스를 잃으면(모듈 인스턴스 외부 클릭) 애니메이션 중지 등의 작업을 수행할 수 있습니다.
void DidChangeFocus(bool focus) {
// Do something like stopping animation or a blinking cursor in the instance.
}
이미지 처리에 대한 자세한 내용은 다음 페이지를 참조하세요.
입력 이벤트를 수용하도록 모듈 등록
모듈에서 이러한 이벤트를 처리하려면 마우스 이벤트의 경우 RequestInputEvents()
, 키보드 이벤트의 경우
RequestFilteringInputEvents()
를 사용하여 입력 이벤트를 수용하도록 모듈을 등록해야 합니다. input_events 예제에서 이 작업은 EventInstance
클래스의 생성자에서 수행됩니다.
explicit EventInstance(PP_Instance instance)
: pp::Instance(instance) {
RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL);
RequestFilteringInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD);
}
RequestInputEvents()
및 RequestFilteringInputEvents()
는 인스턴스에서 수신을 요청하는 이벤트의 클래스를 식별하는 플래그 조합을 입력받습니다. 입력 이벤트 클래스는 PP_InputEvent_Class
enum(ppb_input_event.h
)에 정의되어 있습니다.
이벤트 유형 확인 및 처리 분기
일반적인 구현에서 HandleInputEvent()
함수는 각 이벤트의 유형을 확인하기 위해 GetType()
함수를 사용하며, 이 함수는InputEvent
클래스에 있습니다. 그런 다음 HandleInputEvent()
함수는 switch 명령문을 사용하여 입력 이벤트의 유형에 따라 처리를 분기합니다. 입력 이벤트는 PP_InputEvent_Type
enum(ppb_input_event.h
)에 정의되어 있습니다.
// Handle an incoming input event by switching on type and dispatching
// to the appropriate subtype handler.
virtual bool HandleInputEvent(const pp::InputEvent& event) {
...
switch (event.GetType()) {
case PP_INPUTEVENT_TYPE_UNDEFINED:
break;
case PP_INPUTEVENT_TYPE_MOUSEDOWN:
GotMouseEvent(pp::MouseInputEvent(event), "Down");
break;
case PP_INPUTEVENT_TYPE_MOUSEUP:
GotMouseEvent(pp::MouseInputEvent(event), "Up");
break;
case PP_INPUTEVENT_TYPE_MOUSEMOVE:
GotMouseEvent(pp::MouseInputEvent(event), "Move");
break;
case PP_INPUTEVENT_TYPE_MOUSEENTER:
GotMouseEvent(pp::MouseInputEvent(event), "Enter");
break;
case PP_INPUTEVENT_TYPE_MOUSELEAVE:
GotMouseEvent(pp::MouseInputEvent(event), "Leave");
break;
case PP_INPUTEVENT_TYPE_WHEEL:
GotWheelEvent(pp::WheelInputEvent(event));
break;
case PP_INPUTEVENT_TYPE_RAWKEYDOWN:
GotKeyEvent(pp::KeyboardInputEvent(event), "RawKeyDown");
break;
case PP_INPUTEVENT_TYPE_KEYDOWN:
GotKeyEvent(pp::KeyboardInputEvent(event), "Down");
break;
case PP_INPUTEVENT_TYPE_KEYUP:
GotKeyEvent(pp::KeyboardInputEvent(event), "Up");
break;
case PP_INPUTEVENT_TYPE_CHAR:
GotKeyEvent(pp::KeyboardInputEvent(event), "Character");
break;
default:
assert(false);
return false;
}
return true;
}
이벤트 유형이 확인된 후 HandleInputEvent()
에서 수신한 범용 InputEvent
가 특정 유형(MouseInputEvent
, WheelInputEvent
또는 KeyboardInputEvent
)으로 변환됩니다. 이러한 이벤트 클래스와 관련된 참조 정보는 다음 문서를 참조하세요.
이 예제의 HandleInputEvent()
는 주 모듈 스레드에서 작동합니다. 규모가 큰 실제 애플리케이션에서는 브라우저의 속도 저하를 방지하기 위해 이벤트를 대기열에 넣고 주 스레드와 독립적으로 처리하는 별도의 스레드를 만들 수 있습니다.
위의 그림과 같이 5개의 파일을 다운로드 받은 후 make.bat파일을 cmd를 통해 실행하면 폴더가 생깁니다.
(컴파일결과)
index.html
여기서의 특별한 점은 전 예제와는 다릅니다.
<embed>라는 태그를 html에 삽입하는것이 아닌 자바스크립트상에서 id="listener"를 가져와 그 엘리먼트에 추가하는 것입니다. 이렇게 하면 html 코드는 간단해지고 common.js 파일에 구현되어 있습니다.
여기서의 특별한 점은 없습니다. 딱 두가지만 알면됩니다. 27라인과 30라인 이 id를 통해 자바스크립트상에서 지지고 볶는 역할만 수행합니다.
example.js, common.js를 나눈 이유는 실제 예제에서 담당하는 자바스크립트 부분. NaCl와 호환하며 공통적으로 쓰이는 부분을 나눈 것입니다.
example.js
화면에 표시되어질 20개의 텍스트 줄이 5라인에 명시되어있습니다.
6라인을 통해 메시지를 저장합니다.
9라인의 함수는 이벤트 영역을 회색으로 지정합니다.
14라인부터는 NaCl로부터 이벤트에 대한 문자열 값을 받아서 처리하는 부분입니다.
16라인은 messageArray 배열에 추가하는 것입니다. 나머지 라인은 다 보시면 이해될 것입니다.
21라인은 자바스크립트 method로써 join을 하게되면 <br> 이라는 문자열을 구분자로써 배열 사이사이 마다 넣게 됩니다.
common.js
위의 코드는 <embed>태그를 추가하고 그 안의 값들을 셋팅시켜주며 이벤트로 등록하는 과정입니다.
위의 코드는 load하고 message 하기 위한 (NaCl과) Listener 등록과정입니다.
위의 코드는 donContentLoaded로써 html상에서 dom을 load하고 난 뒤 호출되는 자바스크립트 함수 입니다.
여기서 주목해야 할 점은 191라인에서 createNaClModule함수를 호출한다는 것입니다. 이로써 NaCl모듈을 생성하여
html과 커뮤니케이션 할 수 있는 것을 만듭니다.
제일 최상위에서 load하는 js입니다.
input_events.cc
모듈에서 이러한 이벤트를 처리하려면 마우스 이벤트의 경우 RequestInputEvents()
,
키보드 이벤트의 경우 RequestFilteringInputEvents()
를 사용하여 입력 이벤트를 수용하도록 모듈을 등록해야 합니다. input_events 예제에서 이 작업은 EventInstance
클래스의 생성자에서 수행됩니다.
RequestInputEvents()
및 RequestFilteringInputEvents()
는 인스턴스에서 수신을 요청하는 이벤트의 클래스를 식별하는 플래그 조합을 입력받습니다. 입력 이벤트 클래스는 PP_InputEvent_Class
enum(ppb_input_event.h
)에 정의되어 있습니다.
pp::KeyboardInputEvent::KeyboardInputEvent | ( | const InstanceHandle & | instance, |
PP_InputEvent_Type | type, | ||
PP_TimeTicks | time_stamp, | ||
uint32_t | modifiers, | ||
uint32_t | key_code, | ||
const Var & | character_text | ||
) |
키보드에 관한 값들은 위와 같이
[in] | instance | The instance for which this event occured. |
[in] | type | A PP_InputEvent_Type identifying the type of input event. |
[in] | time_stamp | A PP_TimeTicks indicating the time when the event occured. |
[in] | modifiers | A bit field combination of the PP_InputEvent_Modifier flags. |
[in] | key_code | This value reflects the DOM KeyboardEvent keyCode field. Chrome populates this with the Windows-style Virtual Key code of the key. |
[in] | character_text | This value represents the typed character as a UTF-8 string. |
정의 됩니다. 어떠한 값이든 여기서 걸러서 처리할 수 있으니 유용하게 사용하 면 될 것 같습니다^^
다음은 DidChangeFocus입니다. 포커스가 어디에 있는지 변경 되었는지를 캐치하는 부분입니다.
이벤트 형에 따른 처리 분기는 위에 자료로 있기 때문에 생략합니다.
키보드를 누르고 마우스이벤트를 받는 것을 출력하는 html
정리 : 순서 입니다.
index.html의 div id="listener"등록,
common.js에서 <embed>태그 삽입 후 이벤트로 등록
사용자의 html 입력값에 따라 input_events.cc에서 구분하여 처리
구분은 DidChangeView, DidHandleInputEvent, DidChangeFocus로 나뉩니다.
이후 example.js에서 20줄에 해당하는 html부분에 NaCl모듈로 부터 받는 텍스트 값을 계속 표시합니다.
끄읏~
'Tip & Tech > ETC' 카테고리의 다른 글
1. [Example]message (0) | 2013.04.04 |
---|---|
Secure Coding (0) | 2013.03.19 |
트랙백
댓글
글
NaCl을 이용해서 간단한 메시지 주고받는 example을 만들어 볼려구요.
일단 기본적으로 sdk설치, 기본내용 및 구조 학습, pepper_25 에 대한 배경지식이 있다고 가정하고
진행합니다.
참고 : (https://developers.google.com/native-client/overview?hl=ko#using-existing-code)
다음과 같이 sdk폴더에 pepper_25\\examples\\ 폴더를 새롭게 만들어 줍니다.
저는 m_message로 만들었습니다.
그리고 총 5가지 파일을 만들어야 합니다.
1. m_message.cc :
Native Client에는 모듈과 인스턴스라는 개념이 도입되어 있습니다.
2. m_message.html : m_message.html
은 웹 애플리케이션에 해당하는 웹페이지입니다
3. m_message.nmf : m_message.nmf
는 사용자 컴퓨터의 명령 집합 아키텍처에 따라 로드할 컴파일된 Native Client 모듈(.nexe)을 Chrome에 알리는 Native Client 매니페스트 파일입니다(예: x86-32 또는 x86-64). glibc로 컴파일한 애플리케이션의 매니페스트 파일은 애플리케이션에서 사용하는 공유 라이브러리도 지정해야 합니다.
4. make.bat : @..\..\tools\make.exe %* , 컴파일 하는 명령어
5. Makefile : Makefile
에는 애플리케이션의 실행 가능한 Native Client 모듈(.nexe 파일)을 빌드하는 데 필요한 컴파일 및 링크 명령이 들어 있습니다.
위의 5개의 파일을 다운로드 받은후에 make.bat파일을 실행합니다.
cmd창에서 make, make.bat를 실행해도 좋고 직접 더블클릭해서 컴파일 해도 됩니다.
하지만 cmd창에서 하는것이 오류가 생겼을때 확인해 볼 수 있어서 이 방법을 더 추천합니다.
============================================소 스 설 명 =============================================
m_message.html
컴파일된 Native Client 모듈을 로드하는 <embed> 요소가 포함되어 있습니다.
<embed> 요소는 사용자 컴퓨터의 명령 집합 아키텍처에 따라 로드할 .nexe 파일을 브라우저에 알리는 Native Client 매니페스트 파일을 가리킵니다. <embed> 요소의 폭과 높이가 0으로 설정되어 있는 이유는 그래픽 구성요소가 없기 떄문입니다.
보여줄 필요가 없으니 0으로 설정합니다.
이벤트 리스너를 보시면 브라우저에서 Native Client 모듈 로드에 성공할때 발생하는 'load'이벤트를 수신하며 moduleDidLoad라는 자바스크립트 함수를 호출하게 됩니다.
다른 하나는 Native Client모듈에서 PostMessage()메소드(pp::Instance클래스)를 사용하여 애플리케이션의 JavaScript코드에 메시지를 보낼때 발생하는 'message' 이벤트를 수신합니다.
* 이벤트 리스너를 <embed> 요소에 직접 첨부하는 대신에 상위 <div> 요소에 첨부하는 이러한 기법은 모듈 'laod'이벤트가 발생하기 전에 이벤트 리스너를 활성화 하는데 사용되기 떄문에 위에 배치를 하는 것입니다.
여기서의 주목할 이벤트 핸들러는 두가지 입니다. moduleDidLoad(), handleMessage() JavaScript함수에서 구현됩니다.
<body onload="pageDidLoad()"> 이런코드로 인하여
처음에는 pageDidLoad() 자바스크립스 함수를 호출합니다.
19라인의 기능은 처음 로딩할 때 Loading이라는 문구를 웹페이지의 text값으로 update해주는 것입니다.
10라인의 기능은
listener.addEventListener('load', moduleDidLoad, true);
위와 같이 NaCl 모듈을 Load하고 나면 자바스크립트함수인 moduleDidLoad()를 호출하게 됩니다.
즉 NaCl 모듈이 Load된다면 10라인 함수가 호출되며 'SUCCESS'라는 문구를 text값으로 update해주는 것입니다.
여기까지가 NaCl모듈을 페이지 로드할때 이벤트로써 텍스트 값을 바꿔주는 예제 였습니다.
그 다음으로는 13라인을 주목해 주세요.
이 m_messageModule은 <embed>에있는 NaCl모듈을 읽습니다. 다음 13라인을 통해
NaCl에게 text값인 'hello'라는 값을 postMessage()라는 함수를 통해서 전달합니다.
자 여기까지 html의 역할입니다. (16라인은 NaCl로부터 메시지를 받아서 alert()하는 코드입니다.)
다음으로 m_message.cc를 보면서 설명하겠습니다.
m_message.cc
모듈은 실행 가능한 .nexe파일로 컴파일된 C, C++ 코드입니다.
인스턴스는 웹페이지에서 모듈이 관리하는 직사각형입니다. 인스턴스를 만들려면 <embed> 요소를 사용하여 포함합니다.
모듈을 참조하는 <embed>요소를 여러 개 사용하여 웹페이지에 모듈을 여러번 포함할 수도 있습니다.
m_message.html로부터 'hello'라는 메시지를 수신받는 함수는 HandleMessage함수 입니다.
var_message에 'hello'라는 값이 저장되어있으며 이렇게 var가 붙은 이유는 자바스크립트의 변수와 호환이 되게는 pp::Var을 사용한 것입니다. c++에서 처리하기 위한 코드로 20라인을 보시면 확인하실 수 있습니다.
22라인을 보면 message값이 "hello"랑 같다면 다시 pp:Var의 변수값으로 전환하여 PostMessage(var_reply)를 이용하여
html에 보내주게 됩니다. 이로써 m_message.cc의 역할은 메시지를 수신하여 처리(비교)한 후 html로 메시지를 원하는 값("hello from NaCl")으로 돌려주는 것입니다. 개발자는 여기서 이 문자열 값을 자기가 원하는 방식으로 구현하여 전달 할 수 있습니다.
이 후 m_message.html의 16라인 handleMessage(message_event) 함수로부터 이 값을 전달 받습니다.
이후 html에서는 alert()를 통해 이 값을 출력합니다.
출력된 화면.
나머지 Makefile, m_message.nmf, make 파일은 생략하겠습니다.
정리
- html과 NaCl(C, C++로 구현)과 'hello'스트링값을 주고 NaCl에서 처리하여 가공된 값을 다시 html에 보내주는 과정을 학습
- String값을 NaCl에서 개발자가 원하는 방식으로 처리하여 html문서에 넘길수 있음.
참고 URL : https://developers.google.com/native-client/dev/devguide/tutorial?hl=ko
'Tip & Tech > ETC' 카테고리의 다른 글
2. [Example] Input-Event (0) | 2013.04.04 |
---|---|
Secure Coding (0) | 2013.03.19 |
트랙백
댓글
글
1. "0" -> 48뒤에 '\0'이게 붙음
'\0'-> Ascii 0
'0' -> Ascii 48
0 -> 걍 0
2. i++
i = i+1
i += 1 (책에서는 두번째꺼보다
세번째거가 효율적이라고 함)
효율성 차이 있나??????
3. 비트연산자 => float, double에는 적용안됨
4. short, long -> 자료형이 아니라 한정사
short int -> 2 byte
long int -> 4 byte
long double -> 8 byte
--> 자료형 사이즈 조사 : 조희연
5. 뺄셈에서 보수사용 이유: 컴퓨터가 빼기를 못해서..
6. 저번꺼 ~ Operator->c에서는 키워드였음
c++에서도 키워드,
복소수 같은 기능을 위해서
오버로딩을 지원한다.
7. 자동 형변환 ->
(ex)수식중에는 float-> double은 안됨 !!!
char,short-> int , float-> double 자동 형변환 됨
-1L < 1U
-1L > 1UL
--> 조사: 김기철
8. 관계 연산자는 산술 연산자보다 우선순위가 낮다.
x = n++;
x = ++n;
--> 조사: 이승기
-> 다음부터는 미리 조사해서 발표하기로 :)
'Tip & Tech > 씨씨그' 카테고리의 다른 글
Chapter 1.Introduce the C language (0) | 2013.03.26 |
---|
트랙백
댓글
글
글
글
음악 감상관련 Script
Question]
When and where do you usually listen to music? What device do you use to listen to it? Please tell me in detail.
Answer]
First, I normally listen to music while I'm on my way somewhere, like when I drive a car. It's a great way to spend boring time because my commute is so long. Second, I listen to music when I study because it make me to concentrate at study.
The device I use most often to listen to music is my Smart Phone. The reason is that i'm always carry smart phone and latest smart phone can load with thousands of my favorite albums and songs, so I can always find something I want to liste to. However,
When I use smart phone to listen to music, it's battery use a lot of batterys. So I have to recharge it frequently.
Question]
What kind of music do you like? And please tell me about your favorite singer or composer.
Answer]
My favorite kind of music is hiphop. I love this sort of music because it is really exiting and it makes me happy. Specially, out of all the artists in this genre, I can say that primary is the best. He was a producer of other rapper, for example dynamic duo and lee ssang. But he has many talent about singing. 물음표 , 씨스루 and 입장정리 are the best song of he's album. And he's dance is very sensibility because I think he did't run about basic dance, but when I see his stage, he just get into the rhythm. If you see him, you really surprised.
I really recommend you buy his album.
Question]
Please tell me how your taste in music has changed from your childhood to now.
Answer]
My taste in music has changed quite a lot over the years.
When I was in elementary school, I mainly enjoyed Korean pop music. I spent a lot of time listening to boy band like H.O.T. In high school, my taste start to change, and I became pretty interested in ballad. My favorites at that time were 김종국 and 성시경. Because their voice is really special. However, now days I like hiphop. Specially, my favorite singer is primary and dynamic duo. Because their song is very sensibility.
I recommend you to listen to korean ballad and hip-hop.
'OPIC' 카테고리의 다른 글
7/18 (스포츠 콘서트 관련 Script) (0) | 2013.07.19 |
---|---|
04/04 (외국어 공부 script) (0) | 2013.04.04 |
03/24 (인터넷 서핑관련) (0) | 2013.03.24 |
3/21 (학교 관련 script) (0) | 2013.03.23 |
3/14 (자기소개) (0) | 2013.03.22 |
RECENT COMMENT