렌덤 액세스 ( random access) seekg() 입력 현 위치의 문자를 읽기 위하여 사용된다 istream &seekg( off_type offset, ios::seek_dir origin ); istream &seekg( pos_type position ); seekp() 출력 현 위치에 문자를 쓰기 위하여 사용한다. ostream &seekp( off_type offset, ios::seek_dir origin ); ostream &…
난수 ( rand,srand ) 헤더파일에 #include<stdlib.h> 포함 하고 있어야 된다. 실행할때마다 값이 다르게 나오게 한다. #include<stdio.h> #include<stdlib.h> // srand() 와 rand() 를 위하여 .. #include<time.h> // time() 을 위하여 .. main() { int i,Xrand; srand(time(NULL)); // 시간으로 초기화 .. for(…