'잡동사니'에 해당되는 글 12969건

  1. 2016.07.05 지친다 2
  2. 2016.07.04 하드가 죽었군 -_-
  3. 2016.07.03 c&c general - gla 7
  4. 2016.07.03 컴퓨터 고장? 2
  5. 2016.07.01 cpp enum in class
  6. 2016.07.01 내 새끼 건드리면 빼애애애액
  7. 2016.06.30 망할 놈의 회사
  8. 2016.06.29 블로그 현황 2
  9. 2016.06.28 rpi gstreamer mux
  10. 2016.06.28 shared memory - linux/IPC

회사도

돈도

집도?


용돈없고 낙없는 삶인가...

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

되는게 없구만 ㅠㅠ  (0) 2016.10.08
LG 에어컨 필터 도착! ㄷㄷ  (0) 2016.07.25
망할 놈의 회사  (0) 2016.06.30
일주일 만에 택배도착  (0) 2016.06.04
시놀로지.. freeNAS... 우분투...  (0) 2016.06.01
Posted by 구차니

분해해서 소리를 들어보니

띨끽띨끽...


아으.. 하드 사야지 ㅠㅠ

Posted by 구차니
게임/c&c generals2016. 7. 3. 23:00

쉬움으로 해서 그랬나 나름 쉬운...

중국군때 처럼 미친듯이 밀리는건 아니라 후...


여기랑


여기를 점령해야 한다.




독이 있길래 해봤떠니 팀킬 쩌네 ㅠㅠ


망할 미쿡놈들 ㅠㅠ 파티클 캐논 ㅠㅠ

따닥따닥 붙여 놓는 바람에 건물 두개 박살 ㅠㅠ



파티클 캐논 파괴시 이펙트가 멋지네? ㅋㅋㅋ


짓긴했는데 정작 쓰지 못하고 끝낸 스커드 미사일 ㅠㅠ



중국군 핵 미사일 폭파시키니 이펙트가 ㄷㄷ




생화학 미사일이 발사되고


중국의 도시인거 같은데..


어우... 정말 생화학 공격 전쟁만은... 제발 ㅠㅠ




미션이라 하긴 했는데

겁나 찜찜한 미션 ㅠㅠ

'게임 > c&c generals' 카테고리의 다른 글

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
Posted by 구차니

자꾸 뻗네..


그래픽 카드나... 전원의 문제로 급급급 불안..

돈 없는데 안돼 ㅠㅠ




이렇게 된김에 메인 pc를 라즈베리로?

(어?)



손목도 안 좋아서 

낑낑대며 청소 하는데

메인보드 / 그래픽 카드 쪽 캐피시터 배부른건 없음...

그렇다는건..... 설마 파워? ㅠㅠ

Posted by 구차니
Programming/C++ STL2016. 7. 1. 10:04

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.


g++ 4.6.3 에서는 scope 인식을 하긴 하는데

$ 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일 때는 당연히(!) 다른 클래스에서는 사용 불가

'Programming > C++ STL' 카테고리의 다른 글

객체지향과 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
Posted by 구차니

부모들에게 추천합니다

영화 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
Posted by 구차니

또 세달간 강제 야근/주말 특근..

세달간 확 돈을 땡겨 벌어 보자 에라이 -_-

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

LG 에어컨 필터 도착! ㄷㄷ  (0) 2016.07.25
지친다  (2) 2016.07.05
일주일 만에 택배도착  (0) 2016.06.04
시놀로지.. freeNAS... 우분투...  (0) 2016.06.01
어떤 아주머니  (0) 2016.05.29
Posted by 구차니
개소리 왈왈/블로그2016. 6. 29. 21:52

합산이야.. 네이버가 구글 넘은지가 오래긴 하지만

가장 큰 파이가 네이버를 넘어 버리다니 ㅠㅠ

아무튼... 티스토리에서 구글에서 유입되는걸 잘 못잡는거 같기도 하고..

그냥 우울하네~ 티스토리 버려야 하나? ㅠㅠ



'개소리 왈왈 > 블로그' 카테고리의 다른 글

네이버 수상한데...  (0) 2016.07.28
이 미묘한 기분..  (0) 2016.07.20
티스토리.... 망해가나?  (4) 2016.06.02
5월은 가정 (재정) 파탄의 달?!?  (0) 2016.05.13
문득... 살아있을까?  (0) 2016.04.27
Posted by 구차니
embeded/raspberry pi2016. 6. 28. 18: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]


'embeded > raspberry pi' 카테고리의 다른 글

초음파 센서 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
Posted by 구차니
Linux API/linux2016. 6. 28. 15:56

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]

    [링크 : http://linux.die.net/man/2/ftruncate]

    [링크 : http://linux.die.net/man/2/mmap]

'Linux API > linux' 카테고리의 다른 글

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
Posted by 구차니