<Operator >
1 .Unary Operator
2. Binary Operator
1> Arithmetic Operator
+ - * / %(modulus)
int x = 9, y=2;
int z = x / y; // 몫 4
z= x % y; // 나머지 1
2> Assignment
=
+= int x =10;
x = x+10; // x += 10;
3> Relational Operator => true(!0 - 1)/false(0)
== != < > <= >=
int x = 10;
if (x == 10) // true
4> Logical Operator
&& - short curcuiting ( T T T)
int x =10, y=8;
if ((x++ <10) && (y++ <10))
{
}
|| (F F F)
!
3. Ternary Operator
? :
<loop >
- break
- continue -> pass to 조건 check
<preprocessor>
1. #include
#include <date.h > system include directory
-I$HOME/utils
2. Conditional Compilation
#ifndef DATE_H
#define DATE_H
....
#endif
#ifdef DEBUG
..
#endif
< Microsoft Visual C++ >
1. C/C++ Complier
ANSI C , ANSI C++
ANSI (America National Standard Institute)
2. SDK (Software Development Kit)
- API (Application Programming Interface)
- function <- by Windows OS
- Windows 95/98/ME
- \windows\system\kernel32.dll
gdi32.dll
user32.dll
- Windows NT/2000
\winnt\system32\ .........
- C-style function
3. MFC (Microsoft Foundation Class Library)
- API => Class 화
- 300 classes
4. Developer Studio
5. Tools - debugger, spy,tracer .......
Complie => .obj
Build
Complie
Link
=> .exe
Debug Build vs Release Build
\hello\debug\hello.exe \hello\release\hello.exe
source code .cpp
project file .dsp (Developer Studio Project)
- Project setting
.dsw (Developer Studio Workspace)
.dsp
.cpp
.h
p15
1. Project file 만들기 (simple.dsp simple.dsw)
File
- New
- Project
Win32 Console Application
Name : Simple
2. Source File 만들기 (simple.cpp)
File
- New
- C++ Source File
- Add to Project
- simple