달력

5

« 2024/5 »

  • 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

기본 자료형(32bits)

1) 정수형 (32bit기준)

int : 4byte

short int : 2byte

long int : 4byte

unsigned int : 4byte

unsigned short int : 2byte

->운영체제의 32/64에 따라 달라질 수 있음


2) 실수형

float : 4byte (3.2f)

double : 8byte (3.4)

long double : 8byte 


+ 서로 다른 자료형 간의 연산은 더 큰 형으로 자동 형변환

ex)  int a와 float b의 합의 결과는 float형


3) 문자형

char : 1byte ('a', '5')




함수 네이밍 룰 : 

1) 동사+대상 

ex) addChild : 더한다+자식 -> 자식을 추가하는 함수

2) 첫 글자는 소문자로 시작

ex)

bool isTrue()

int sprData;


클래스 네이밍 룰 :

1) 모든 단어의 첫 글자는 대문자로 사용

ex) class SpriteBatchNode

:
Posted by 웽웽