프로그래밍/C2015. 1. 15. 18:11
error: aggregate value used where an integer was expected

위와 같은 에러를 본다면, 아마도 구조조체의 멤버 대신 구조체를 직접 integer로 캐스팅하려는 실수를 했을 때 나오는 것이다.

'프로그래밍 > C' 카테고리의 다른 글

c에서 연결리스트에서 노드 생성 시,  (0) 2015.07.11
call-by-reference in C?  (0) 2014.09.11
for 문 multiple 조건 & 처리  (0) 2014.06.05
strerror 사용법, perror 사용법  (0) 2014.06.02
malloc 를 캐스팅 하지 말자.  (0) 2014.05.29
Posted by code cat
프로그래밍2014. 12. 26. 14:02

엑셀은 포스팅 안하는데 아래팁은 좀 많이 편해서...

우선 원하는 셀에 가서 초기값을 x 만큼 입력한다.

 

 A

 B

 C

 1

 0

 

 

 2

 0

 

 

 3

 0

 

 

 4

 

  
 5   




그리고 마지막 값의 위치(A3)
에 가서

=IF(A3=A1, A3+1, A3)

이라고 입력 뒤, 쭈욱 드래그 하면 된다.

 

 A

 B

 C

 1

 0

 

 

 2

 0

 

 

 3

 0

 

 

 4

 1

  
 5 1  
 6 1  
 7 2  
 8 2  
 9 2  
 10 3  


'프로그래밍' 카테고리의 다른 글

[Ruby] gem install 시에 에러  (0) 2014.09.06
[읽는중] 점프투파이썬  (0) 2013.12.24
cpplint 사용후기  (0) 2013.12.05
db8 schema  (0) 2013.12.03
[일반][프로그래밍]비대칭경계  (0) 2013.10.26
Posted by code cat

우선 meld 는 다음과 같이 설치한다.

sudo python setup.py install

그러면 대부분 다음과 같은 에러를 만난다.

meld : unable to execute 'intltool-update'

 

이를 해결하기 위해선 다음과 같이 실행한다.

sudo apt-get install intltool itstool

그리고 다시 sudo python setup.py install 하면 된다.

리눅스를 쓰면서 항상 소위 빡치는게, 뭔가 설치 할 때 dependency에 대한 체크와 처리 방법이 부족하다.  dependency이름도 스스로 알아야 설치를 하던 말던 한다.

그냥 설치할 때 자동으로 설치하면 안될려나? 그런게 synaptic 같은 거겠지?

'리눅스 > 스크립트/유틸' 카테고리의 다른 글

cscope manpage  (0) 2014.09.07
cscope + quickfix  (0) 2014.08.29
samba log 관리  (0) 2014.08.28
iso-8859-1 포맷 파일에 들어간 한글이 깨져나올때  (0) 2014.08.12
현재 설정된 java 위치 알아내기  (0) 2014.07.14
Posted by code cat
리눅스2014. 11. 12. 08:49

출처:http://www.linux-m68k.org/faq/glibcinfo.html

What's the difference between glibc and libc6?

libc is the C library; basically, it contains all of the system functions that most (if not all) programs need to run on Linux. It's similar to a combination of dos.library and exec.library on Amigas, but it also contains a lot of things that are in the C runtime library (like, for example, ixemul.library or the .lib files included with SAS/C and other compilers for AmigaOS).

libc6 and glibc are the same version of libc; officially, it's version 2 of the GNU C Library (but it's the sixth major version of the Linux C library). You can read more about glibc at the GNU C Library pages.

The major versions of libc for Linux/m68k are:

  • libc4: Version 4 of the C library is based on the a.out binary format; it was the first version to support dynamic linking (shared libraries). However, a.out dynamic linking had a lot of problems (for example, you had to build the library twice, so you could add a jump table to the library on the second pass, and the library was non-relocatable, so every library had to be allocated a block of space to load into), so it was abandoned (at least on m68k; Intel users may still need it for some esoteric applications). You should not be using libc4 for anything any more. If you do use it, we will hunt you down and execute you as an example to others. (Not really, but you get the point...)

  • libc5: Version 5 of the C library was a fairly big improvement over version 4. However, it still had some problems (adding new functions or changing structure sizes introduced subtle bugs) so it is no longer being actively developed. It was the first version of the Linux C Library based on ELF, a different file format that made programs loadable in more flexible ways (it uses hunks, similar to the AmigaOS executable file format). libc5 is officially deprecated on m68k; use libc6 for new compilations.

  • libc6: Version 6 of the Linux C Library is version 2 of the GNU C Library; the confusion is because Linux has had multiple C library versions. This is the newest technology available, and includes features (like "weak symbols") that theoretically allow new functions and modified structures in the library without breaking existing code that uses version 6, and avoid kernel version dependency problems. You should be coding and compiling all code against this version. 


Posted by code cat
리눅스2014. 9. 29. 09:12

소스 코드 라인이 몇줄이나 되는지 알아보고 싶을때가 있다.

다음은 c파일이나 header파일의 소스 코드 라인 수를 세는 방법이다.

find . -name '*.[ch]' | xargs wc -l


'리눅스' 카테고리의 다른 글

libc6?  (0) 2014.11.12
[GIT] 자신이 따온 clone 주소 알아보기  (0) 2014.09.23
upstart 설치하기  (0) 2014.09.15
.pam_environment  (0) 2014.09.04
[wireshark] there are no interfaces on which a capture can be done  (0) 2014.09.02
Posted by code cat