거의 차이가 없으며
차이점은 아무런 명시를 하지 않았을 때 class 멤버가 private 권한을 가지고 struct는 public을 가진다는 것이다
struct sTest{
public:
sTest() :x(0){};
~sTest(){};
void sFunc(){};
private:
int x;
};
class cTest{
public:
cTest():x(0){};
~cTest(){};
void cFund(){};
private:
int x;
};
'컴퓨터 과학 & 영상처리 관련 > C / C++' 카테고리의 다른 글
inline function (0) | 2013.03.02 |
---|---|
STL 쓸 때 비교연산? 이거 좀 햇갈리던데 (0) | 2013.02.14 |
STL 알고리즘 분류 (0) | 2013.02.14 |
c++ reference(&) 에 대한 정보 (0) | 2013.02.14 |
stringstream 으로 atoi? (0) | 2013.02.14 |