본문 바로가기

program

std::string c++ 활용 예제 #include #include using namespace std; int main(){string str = "my name is"; // 확장str.append(" onegun");cout 더보기
빠르게 랜덤변수 발생시키기 int g_seed;int fastrand() { g_seed = (214013 * g_seed + 2531011);return (g_seed >> 16) & 0x7FFF;} 기존에는 아래와 같은 방식으로 랜덤 변수를 생성하였었다.time_t seconds;time(&seconds);srand((unsigned int)seconds);//srand((unsigned)time(0));v0 = rand() % 10; 하지만 이 방식은 초당으로 seed 가 변해서 그런지, 랜덤숫자가 빠르게 변하지 않는 단점이 있다. 이 대신에 fastrand 를 사용하면, 빠른 속도로 랜덤한 변수를 얻을 수 있다. 더보기
가벼운 음악재생 프로그램 small tiny light music player http://www.foobar2000.org/ 더보기
desktop search program Everything Search Engine http://www.voidtools.com/ indexing 이나 no indexing search 를 지원함 더보기
programmer 용어 사전 fetch To load an instruction or piece of data from memory into a CPU's register. All instructions must be fetched before they can be executed. The time it takes to fetch an item is known as the fetch time or fetch cycle, and is measured inclock ticks. 더보기
c 와 c++ 의 static 내용정리 학생때 적어놓았던 강좌인데 필요로 하시는 분들이 계시내요. 참고하세요. static와 const를 생각나는데로 죽~ 정리해 봤습니다. static부분 순서는 다음과 같습니다. 1. static 지역변수 - 1 2. static 지역변수 - 2 : 배열/포인터를 리턴하는 함수 3. static 전역변수 4. static 함수 5. static 멤버변수 6. static 멤버함수 빼먹은것 없이 정리할려고 했는데, 잘 되었는지 모르겠군요. 혹시 보시고 틀리거나 잘못된 사항 있으면 지적해 주시구요.. 많은 도움 되었으면 합니다.^^ ================================================================ #include using namespace std; void f.. 더보기