@ 파일전체를 한번에 출력하기(위치 지정자 사용) >> #include #include #include using namespace std; int main() { ifstream theFile("players.txt"); string s; if (theFile.is_open()) { theFile.seekg(0, ios::end); // 위치 지정자를 파일 끝으로 옮기기 int size = theFile.tellg(); // 가져오려는 파일의 크기구하기 s.resize(size); // 구한 크기를 s에 할당하기 theFile.seekg(0, ios::beg); // 위치 지정자를 파일 맨맢으로 옮기기 theFile.read(&s[0], size); // 파일 전체내용을 읽어서 문자열에 저장 cout

Code #include using namespace std; int main() { int a, b, div; int num1[3] = { 0, }; int num2[3] = { 0, }; cin >> a >> b; num1[0] = a / 100; // 자리수 분리 num1[1] = (a / 10) % 10; num1[2] = a % 10; num2[0] = b / 100; // 자리수 분리 num2[1] = (b / 10) % 10; num2[2] = b % 10; if (num1[2] > x2; arr1 = ReverseNum(arr1..

Code #include #include using namespace std; #define MAX 1000000 int main() { ios::sync_with_stdio(NULL); cin.tellg(); char s[MAX] = { 0, }; int count = 1; cin.getline(s, MAX, '\n'); for (int i = 0; s[i]; i++) { if (s[i] == ' ' && (i != 0)) count++; } // for if (s[strlen(s) - 1] == ' ') count--; cout
- Total
- Today
- Yesterday
- 웹 어플리케이션 서버
- getline()
- 1152
- 쉘
- 백준
- 트리만들기
- boj
- 알고리즘
- ??!
- 데이터저장장치
- 단어의 개수
- 문자열입력
- web application server
- 백준알고리즘
- 25083
- stringstream
- 파일입출력
- 정수를 문자열로
- C++
- 토이사이퍼
- 정수
- toy cipher
- Web Server
- cin.getline()
- 운영체제
- 자료구조
- 커널
- 네트워크결합스토리지
- 웹 서버
- to_string
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |