2의 역승수
2의 승수 있잖아? 2의 3승은 8이고.. 2의 4승은 16이고.. 2의 5승은 32고.. 뭐 이런것들.. 근데 뒷자리 숫자로 앞자리 숫자를 구할때.. 그러니까.. 2의 몇승이 1024인지 확인하고 싶을때가 있을때.. cmath include해서 log2() 함수로 구할수도 있지만, 실수연산이라 오버헤드가.. cstring include해서 ffs()라는 함수가 있다. find first bitset이라고 설명이 되어있고.. gcc에서 잘 동작하는 코드임.. #include int ffs(int i); #define _GNU_SOURCE #include int ffsl(long int i); int ffsll(long long int i);
Application/C/C++
2016. 5. 1. 08:19
2015년 3월 22일 과제
QT로 메모장 만들기
Application/C/C++
2015. 3. 29. 12:34
공지사항
- Total
- 6,991,833
- Today
- 275
- Yesterday
- 374
TAG
- Web Programming
- Military
- 막장로그
- 3D Engine
- Battle
- win32
- Mabinogi
- humor
- Assembly
- WDB
- diary
- 프리랜서로 살아남는 법
- 짤방 및 아이콘
- USB Lecture
- cartoon
- C#
- network
- medical
- 나비효과
- BadCode
- console
- Linux
- wallpaper
- Embedded System
- Network Inspector
- Information Processor
- 야마꼬툰
- Tech News
- Life News
- Reverse Engineering