분류 전체보기48 리눅스 쉘 단축키 Keyboard shortcuts for bash Ctrl + A Go to the beginning of the line you are currently typing on Ctrl + E Go to the end of the line you are currently typing on Ctrl + L Clears the Screen, similar to the clear command Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line. Ctrl + H Same as backspace Ctrl + R Let’s you search through previously used commands Ctrl + C Ki.. 2015. 4. 9. C++ 파일 입출력 ofstream / ifstream C++ programming에서는 fstream의 ofstream / ifstream 클래스를 이용하여 파일을 입출력한다. getline( fin, line ) extracts characters from fin and stores them into line variable getline()은 '/n'(defalut)을 입력의 끝으로 인식하여 정해진 길이만큼 한줄 전체를 읽어들인다. #include using namespace std; #define MAX_SIZE 1000 char inputString[MAX_SIZE]; int main() { // write a file ofstream outFile( "output.txt" ); for( int i=0; i 2015. 4. 9. Eigen3 Library Constructors #include #include using namespace Eigen; Matrix3f A; MatrixXf B; MatrixXf C( 10, 15 ); VectorXf d( 30 ); Matrix3F E; E 2015. 3. 27. STL vector class vector는 STL에서 가장 자주 사용하는 라이브러리이다. 프로그래밍을 할 때 가장 자주 사용하는 자료구조는 배열(array)인데, vector는 배열을 대체하여 쓸 수 있다. 배열의 경우 같은 종류의 데이터가 순차적으로 저장된다. 배열의 크기는 고정되어 있지만 vector는 동적으로 변한다는 점이 vector와 array의 가장 큰 차이점이다. 1. 배열의 특징 - 크기 고정: 처음에 크기를 설정하면 이후에 크기를 변경하지 못한다. - 중간에 데이터 삽입, 삭제가 용이하지 않다. - 구현이 쉽다. - 데이터를 순차적으로 저장하므로 랜덤 접근이 가능하다. 2. vector를 사용해야 하는 경우 - 저장할 데이터의 개수가 가변적이다. - 중간에 데이터 삽입, 삭제가 없다. 가장 뒤에서부터 데이터를 삭제하.. 2015. 3. 25. 이전 1 ··· 4 5 6 7 8 9 10 ··· 12 다음