#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)
-
The latent SVM tells the learning method used in this paper -> "Discriminatively trained deformable part models". The authors s...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv rgb converting example code. refer to this page -> http://feel...
-
My Environment : MS VS 2008 & MFC(Dialog Based) Joy Stick : Logitech Extreme 3D pro (XBox Type) Cteated Date : 2012. 03 [source code]...
-
refer to code: .. import torch # create a tensor x = torch . randn ( 3 , 4 ) # set print options to display full tensor torch . set_print...
-
Creating a custom CUDA kernel that directly utilizes tensor cores is an advanced topic, as tensor cores are typically accessed through highe...
-
Created Date : 2011.10 Language : C/C++ Tool : Microsoft Visual C++ 2008 Library & Utilized : OpenCV 2.3 Reference : SIFT referenc...
-
KEY KeyCode ASCII KEY KeyCode ASCII 0 48 48 Numpad 0 96 48 1 49 49 Numpad 1 97 49 2 50 50 Num...
-
yolo v5 data coordinate format ex) str_v = "32 0.262 0.7878 0.314 0.385" #read image cvmat = cv2.imread(img_path) #get height, w...
-
Example 1: Basic Variadic Template # include <iostream> // 1. Simple function that accepts any number of arguments template ...
-
Optical Flow sample source code using OpenCV. It programed based on http://feelmare.blogspot.kr/2012/10/make-2-frame-having-time-interv...
No comments:
Post a Comment