Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1993

example to split a cpp string into tokens

$
0
0
Hi!

Here i wrot a little program to split a cpp string into tokens without getline.
The several tokens will save in a vector of cpp strings. After this done
the several vectors are converted into integer values

first header strwork.h:
Code:
#ifndef STRWORK_INC_
#define STRWORK_INC_ 1

#include <iostream>  
#include <stdlib.h> //atoi EXIT_SUCCESS
#include <string.h> // strcpy, strtok
#include <vector>
#include <sstream> // stringstream
#include <complex.h>


std::string showchar(int...
example to split a cpp string into tokens

Viewing all articles
Browse latest Browse all 1993

Trending Articles