#include < iostream >
#include < string >
#include < sstream >
using namespace std;
vector< string> str_split(const string &s, char delim)
{
vector< string> elems;
stringstream ss(s);
string item;
while (getline(ss, item, delim)) {
elems.push_back(item);
}
return elems;
}
int main()
{
vector< string> str = str_split( "123,456", ',');
for(int i=0; i< str.size(); ++i)
{
printf("%s\n", str[i].c_str() );
}
}3/11/2014
C,C++, string split example source code (stringstream, getline functions)
Subscribe to:
Post Comments (Atom)
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
Logistic Classifier The logistic classifier is similar to equation of the plane. W is weight vector, X is input vector and y is output...
-
Background subtractor example souce code. OpenCV support about 3 types subtraction algorithm. Those are MOG, MOG2, GMG algorithms. Det...
-
This is data acquisition source code of LMS511(SICK co.) Source code is made by MFC(vs 2008). The sensor is communicated by TCP/IP. ...
-
Created Date : 2011.2 Language : C/C++ Tool : Microsoft Visual C++ 2010 Library & Utilized : OpenCV 2.2 Reference : Interent Refer...
-
RTSP(Real Time Streaming Protocol) is video streaming, it usually sent from network camera. VideoCapture function in opencv also can get r...
-
Created Date : 2011.10 Language : C/C++ Tool : Microsoft Visual C++ 2008 Library & Utilized : OpenCV 2.3 Reference : SIFT referenc...
-
ONNX Runtime with ROCm (AMD GPU) Setup Guide Installation Prerequisites ROCm installed (6.0+ recommended) Python 3.8-3.10 Install ONNX Runti...
-
This is example for background subtraction on opencv 3.2 version previously, I post 2.7 version example on here. http://study.marearts.co...
-
This is advanced from " http://feelmare.blogspot.kr/2011/08/camera-calibration-using-pattern-image.html " When you run the c...

No comments:
Post a Comment