회사도
돈도
집도?
용돈없고 낙없는 삶인가...
'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글
되는게 없구만 ㅠㅠ (0) | 2016.10.08 |
---|---|
LG 에어컨 필터 도착! ㄷㄷ (0) | 2016.07.25 |
망할 놈의 회사 (0) | 2016.06.30 |
일주일 만에 택배도착 (0) | 2016.06.04 |
시놀로지.. freeNAS... 우분투... (0) | 2016.06.01 |
회사도
돈도
집도?
용돈없고 낙없는 삶인가...
되는게 없구만 ㅠㅠ (0) | 2016.10.08 |
---|---|
LG 에어컨 필터 도착! ㄷㄷ (0) | 2016.07.25 |
망할 놈의 회사 (0) | 2016.06.30 |
일주일 만에 택배도착 (0) | 2016.06.04 |
시놀로지.. freeNAS... 우분투... (0) | 2016.06.01 |
분해해서 소리를 들어보니
띨끽띨끽...
아으.. 하드 사야지 ㅠㅠ
문득 적어 보는 컴퓨터 사용기 (1) | 2016.11.15 |
---|---|
아.. 막 클릭해서 열어보고 싶고 그러네? (2) | 2016.07.07 |
컴퓨터 고장? (2) | 2016.07.03 |
win7 on tc1100 성공 + 지름 예고 (0) | 2016.02.28 |
망할 U+ 공유기 ㅋㅋㅋ (0) | 2016.02.17 |
쉬움으로 해서 그랬나 나름 쉬운...
중국군때 처럼 미친듯이 밀리는건 아니라 후...
여기랑
여기를 점령해야 한다.
독이 있길래 해봤떠니 팀킬 쩌네 ㅠㅠ
망할 미쿡놈들 ㅠㅠ 파티클 캐논 ㅠㅠ
따닥따닥 붙여 놓는 바람에 건물 두개 박살 ㅠㅠ
파티클 캐논 파괴시 이펙트가 멋지네? ㅋㅋㅋ
짓긴했는데 정작 쓰지 못하고 끝낸 스커드 미사일 ㅠㅠ
중국군 핵 미사일 폭파시키니 이펙트가 ㄷㄷ
생화학 미사일이 발사되고
중국의 도시인거 같은데..
어우... 정말 생화학 공격 전쟁만은... 제발 ㅠㅠ
미션이라 하긴 했는데
겁나 찜찜한 미션 ㅠㅠ
c&c generals - usa 2 (0) | 2016.07.08 |
---|---|
c&c generals - usa 1 (0) | 2016.07.08 |
c&c general - gla 6 (0) | 2016.06.26 |
c&c general - gla 5 (0) | 2016.06.26 |
c&c general - gla 4 (0) | 2016.06.26 |
자꾸 뻗네..
그래픽 카드나... 전원의 문제로 급급급 불안..
돈 없는데 안돼 ㅠㅠ
이렇게 된김에 메인 pc를 라즈베리로?
(어?)
손목도 안 좋아서
낑낑대며 청소 하는데
메인보드 / 그래픽 카드 쪽 캐피시터 배부른건 없음...
그렇다는건..... 설마 파워? ㅠㅠ
아.. 막 클릭해서 열어보고 싶고 그러네? (2) | 2016.07.07 |
---|---|
하드가 죽었군 -_- (0) | 2016.07.04 |
win7 on tc1100 성공 + 지름 예고 (0) | 2016.02.28 |
망할 U+ 공유기 ㅋㅋㅋ (0) | 2016.02.17 |
심심하니 리눅스 서버 구축.. ubuntu 15.10 (0) | 2016.02.15 |
cpp이랑은 안친한데 크윽 ㅠㅠ
컴파일러나 Cxx 적용 버전의 차이겠지만
$ g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cat enum.cpp #include <iostream> class A { public: int a; enum { A_1, A_2, A_3 }; }; class B { public: int b; enum { B_1, B_2, B_3 }; }; int main() { A a; B b; a.a = B_1; a.a = A_1; b.b = A_1; b.b = B_1; return 0; } |
$ g++ enum.cpp enum.cpp: In function ‘int main()’: enum.cpp:33:8: error: ‘B_1’ was not declared in this scope enum.cpp:34:8: error: ‘A_1’ was not declared in this scope |
clang에서는 scope를 조금더 정밀하게 따지는 듯?
$ clang --analyze enum.cpp enum.cpp:33:8: error: use of undeclared identifier 'B_1' a.a = B_1; ^ enum.cpp:34:8: error: use of undeclared identifier 'A_1' a.a = A_1; ^ enum.cpp:36:8: error: use of undeclared identifier 'A_1' b.b = A_1; ^ enum.cpp:37:8: error: use of undeclared identifier 'B_1' b.b = B_1; ^ 4 errors generated. |
scope만 잡아주면.. public에서 선언한거라 문제없이 되는건가?
$ cat enum.cpp #include <iostream> class A { public: int a; enum { A_1, A_2, A_3 }; }; class B { public: int b; enum { B_1, B_2, B_3 }; }; int main() { A a; B b; a.a = B::B_1; a.a = A::A_1; b.b = A::A_1; b.b = B::B_1; return 0; } |
$ g++ enum.cpp $ clang --analyze enum.cpp |
enum 자체에 private를 줘보니..
에러 뿜뿜!
$ cat enum.cpp #include <iostream> class A { public: int a; private: enum { A_1, A_2, A_3 }; }; class B { public: int b; private: enum { B_1, B_2, B_3 }; }; int main() { A a; B b; a.a = B::B_1; a.a = A::A_1; b.b = A::A_1; b.b = B::B_1; return 0; } |
$ g++ enum.cpp enum.cpp: In function ‘int main()’: enum.cpp:25:3: error: ‘B::<anonymous enum> B::B_1’ is private enum.cpp:37:11: error: within this context enum.cpp:11:3: error: ‘A::<anonymous enum> A::A_1’ is private enum.cpp:38:11: error: within this context enum.cpp:11:3: error: ‘A::<anonymous enum> A::A_1’ is private enum.cpp:40:11: error: within this context enum.cpp:25:3: error: ‘B::<anonymous enum> B::B_1’ is private enum.cpp:41:11: error: within this context |
$ clang --analyze enum.cpp enum.cpp:37:11: error: 'B_1' is a private member of 'B' a.a = B::B_1; ^ enum.cpp:25:3: note: declared private here B_1, ^ enum.cpp:38:11: error: 'A_1' is a private member of 'A' a.a = A::A_1; ^ enum.cpp:11:3: note: declared private here A_1, ^ enum.cpp:40:11: error: 'A_1' is a private member of 'A' b.b = A::A_1; ^ enum.cpp:11:3: note: declared private here A_1, ^ enum.cpp:41:11: error: 'B_1' is a private member of 'B' b.b = B::B_1; ^ enum.cpp:25:3: note: declared private here B_1, ^ 4 errors generated. |
결론
public일 경우 당연히(!) 다른 클래스에서도 사용 가능,
private일 때는 당연히(!) 다른 클래스에서는 사용 불가
객체지향과 if문? (0) | 2016.07.11 |
---|---|
cpp 클래스 구성 (0) | 2016.07.11 |
cpp const (0) | 2016.06.22 |
const 멤버 변수 초기화(member variable initializer) (0) | 2016.06.22 |
std::endl (0) | 2015.06.24 |
부모들에게 추천합니다
영화 taken
[링크 : http://media.daum.net/society/others/newsview?newsid=20160701040102740]
근데.. 아들네 부모 vs 딸네 부모
둘다 taken 찍으면 볼만하겠는데?
lg 에어컨(신형) 필터 교체 신청 (0) | 2016.07.21 |
---|---|
그러고 보니 전기가 안부족한 듯? (0) | 2016.07.11 |
6.25 (0) | 2016.06.25 |
영국 브렉시트 (0) | 2016.06.24 |
결국은 테러방지법 통과?! (0) | 2016.03.03 |
또 세달간 강제 야근/주말 특근..
세달간 확 돈을 땡겨 벌어 보자 에라이 -_-
LG 에어컨 필터 도착! ㄷㄷ (0) | 2016.07.25 |
---|---|
지친다 (2) | 2016.07.05 |
일주일 만에 택배도착 (0) | 2016.06.04 |
시놀로지.. freeNAS... 우분투... (0) | 2016.06.01 |
어떤 아주머니 (0) | 2016.05.29 |
합산이야.. 네이버가 구글 넘은지가 오래긴 하지만
가장 큰 파이가 네이버를 넘어 버리다니 ㅠㅠ
아무튼... 티스토리에서 구글에서 유입되는걸 잘 못잡는거 같기도 하고..
그냥 우울하네~ 티스토리 버려야 하나? ㅠㅠ
네이버 수상한데... (0) | 2016.07.28 |
---|---|
이 미묘한 기분.. (0) | 2016.07.20 |
티스토리.... 망해가나? (4) | 2016.06.02 |
5월은 가정 (재정) 파탄의 달?!? (0) | 2016.05.13 |
문득... 살아있을까? (0) | 2016.04.27 |
gst-launch-1.0 \
v4l2src device=$VIDEO_DEVICE \
! $VIDEO_CAPABILITIES \
! mux. \
alsasrc device=$AUDIO_DEVICE \
! $AUDIO_CAPABILITIES \
! mux. \
avimux name=mux \
! filesink location=test-$( date --iso-8601=seconds ).avi
[링크 : https://www.linuxtv.org/wiki/index.php/GStreamer]
초음파 센서 wiring pi 버전 (0) | 2016.07.10 |
---|---|
초음파/온습도 센서 데이터 시트 복사 (0) | 2016.07.10 |
beowulf / openMPI (0) | 2016.06.28 |
redmine on raspberrypi (9) | 2016.06.23 |
gsteamer rtspsink (0) | 2016.06.21 |
System V와 POSIX 차이
[링크 : http://stackcanary.com/?p=59]
System V
[링크 : http://linux.die.net/man/2/shmget]
[링크 : http://linux.die.net/man/2/shmat] attach
[링크 : http://linux.die.net/man/2/shmdt] detach
[링크 : http://linux.die.net/man/2/shmctl]
POSIX
System V shared memory (shmget(2), shmop(2), etc.) is an older shared memory API. POSIX shared memory provides a simpler, and better designed interface; on the other hand POSIX shared memory is somewhat less widely available (especially on older systems) than System V shared memory.
[링크 : http://linux.die.net/man/7/shm_overview]
[링크 : http://linux.die.net/man/3/shm_open]
pthread detach while (0) | 2016.12.20 |
---|---|
fd <-> fp 변환 (0) | 2016.10.07 |
메시지 큐 - ipc (0) | 2016.06.28 |
pthread mutex shm_open (0) | 2016.06.27 |
리눅스 동적 라이브러리(*.so) 사용하기 (0) | 2016.04.04 |