Want to add certain symbols inside my program in C++ how it will work see the codeView more random threads:
- What is the difference between “object = this->object” and...
- What is Aggregation in OOP?
- C++ access private data members in another class
- how to pass a simlpe list of data type struct to function...
- In file included from...
- what is ADT in simple words?
- C++ Guessing Game include Number and ABC
- What is the difference among calloc function ,malloc...
- question adout c++ 2011
- A partial specialization may inherit from an ordinary class
using namespace std;
int main()
{
string line;
string total;
ifstream myfile ("tr.txt");
if (myfile.is_open())
{
while ( myfile.good() )
{
getline (myfile,line);
total = total + line;
}
myfile.close();
}
typedef boost::tokenizer< boost::char_separator<char> > tokenizer_type ;
const char* const dropped_delimiters = "',/!@#$%^&*()-_=+|]}[{:;'?/>.<,\\" ; // nothing
const char* const kept_delimiters = " \t" ; // space, tab
boost::char_separator<char> separator( dropped_delimiters, kept_delimiters ) ;
tokenizer_type toker( total, separator ) ;
Sponsored Links
int cnt = 0 ;
for( tokenizer_type::iterator beg = toker.begin() ; beg != toker.end(); ++beg )
std::cout << "token " << ++cnt << ": '" << *beg << "'\n";
}
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
There are currently 1 users browsing this thread. (0 members and 1 guests)