기본적으로 아래와 같이 기록해 주어야 함
// test.cpp
#include <iostream>
using namespace std;
int main()
{
string strLine = "Domain_0_1 = 1, 1";
string str2("*");
size_t comment = strLine.find(str2);
string::size_type nBeg;
string::size_type nEndOfColumn;
string::size_type nEnd;
nBeg = strLine.find_first_not_of(" =", 0);
nEnd = strLine.find_first_of(" =", nBeg);
cout << "nBeg:" << nBeg <<"\n";
cout << "nEnd:" << nEnd <<"\n";
}
complie 는 g++ 로
$g++ test.cpp
그럼 a.exe 파일이 생성됨
'SystemProgramming' 카테고리의 다른 글
Linux Memory 관리 (0) | 2021.05.08 |
---|---|
sar : 프로세스(CPU core) 가 어떤 mode 로 작업 중인가? (0) | 2021.05.07 |
strace : 어떠한 system call 이 호출되었는가? (0) | 2021.05.07 |
이 분야의 필독서 / 필독사이트 (0) | 2021.05.06 |
size_t 와 string::size_type (0) | 2021.04.16 |