473,320 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

HELP: pair-value search & replace?

Does anyone know to quickly make a multiple search & replace app (in either C or C++)? Am not interested in searching multiple files, just one file. I want to translate a list of unicode characters into something else (pair-value lookup table) ... so it's basically a crude/naive translator!

I just need a quick pseudocode to get me started. Or maybe there's an opensource/free code already written?

PS: Or maybe it's easier quicker with sed/awk/perl?
Aug 10 '10 #1
1 1310
weaknessforcats
9,208 Expert Mod 8TB
Put your pair values in a C++ multimap.

Then use the equal_range algorithm to get the begin/end iterators for the multiple keys.

Just iterate between the iterators.
Aug 10 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Neil Zanella | last post by:
Hello, I would like to ask how come the design of C++ includes std::pair. First of all I don't think many programmers would use it. For starters, what the first and second members are depends...
6
by: Charlie | last post by:
Dear all, I am stuck on this problem, couldn't find an answer on any C++ book in the bookshop. Following is a cut of my program, and its error message:...
3
by: Dan Trowbridge | last post by:
Hi everyone, In my attempt to port code from VS 6.0 to VS.NET I had some code break along the way, mostly due to not adhereing closely to the C++ standard. This may be another instance but I...
8
by: akira2x3x | last post by:
Hello, I get this error while compiling with visualc++ and STL roguewave. With STL microsoft everything work fine. XXXData.cpp f:\xxxxx\product\rw\rcb1.2.0\rm\include\rw\_pair.h(63) : error...
4
by: orel | last post by:
<o_r_l_25@yahoo.frwrote, As the message says, to help the compiler with template parsing, I add 'typename' as you said, it now understands the expression, but but i have now those complier...
5
by: prakash.mirji | last post by:
I am using evaluation copy of RW 9.0 for porting one of C++ application on RHEL4 (x86 platform). We are getting some issues into RW template classes. Please need assistance on this issue. Here...
9
by: shaun roe | last post by:
Question about pointer-to-data members I have a deeply nested loop, the innermost bit looks a little like this: for(it(vec.begin(), end(vec.end()), it!=end;++it){ if (global == 0){ myObj =...
3
by: eiji.anonremail | last post by:
Hi folks, I have a compile problem on linux, and maybe someone has an idea: #include <map> #include <iostream>
10
by: Alex Vinokur | last post by:
Hi, Is it possible to do C++-casting from const pair<const unsigned char*, size_t>* to const pair<unsigned char*, size_t>* ? Alex Vinokur
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.