기본적으로 아래와 같이 기록해 주어야 함
// 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 파일이 생성됨
'Linux_system' 카테고리의 다른 글
scanf() 오류 (0) | 2023.02.02 |
---|---|
size_t 와 string::size_type (0) | 2022.12.09 |
Linux System Programming 의 필독서 (0) | 2022.12.09 |
strace : 어떠한 system call 이 호출되었는가? (0) | 2022.12.09 |
sar : 프로세스(CPU core) 가 어떤 mode 로 작업 중인가? (0) | 2022.12.09 |