04-18-2014
Map Question C++
Hello All,
I am having an issue of putting a Boolean value in the maps as the 3rd parameter. Something like the following :
int value;
std::map<String str, int x, bool bl>
where bool returns false if x>value else true.
All I see in the map examples is that I can add the compare object parameters which compares the key value of the map and returns the result accordingly.
Any suggestion would be greatly appreciated!
Thanks,
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
There is a "Map"? of Unix and all its varients somewhere on the net. I used to have the link , but can't find it now. Anyone out there have a clue????
A good magician never reveals his secret; the unbelievable trick
becomes simple and obvious once it is explained. So too with... (3 Replies)
Discussion started by: Bodhi
3 Replies
2. UNIX for Advanced & Expert Users
Hi all
I have to compare maps/files on two seperate boxes and the output must be as following:
1)list the maps/file on box1
2)list the maps/file on box2
3)List maps in both the environments
a) which are same
b)which are different
pls any ideas are appreciated
thnks (2 Replies)
Discussion started by: bkan77
2 Replies
3. UNIX and Linux Applications
I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this:
- points in map view (no 3D view)
- color of each point should depend on its z-value.
- I want to define my own color scale
-... (0 Replies)
Discussion started by: karman
0 Replies
4. UNIX for Advanced & Expert Users
I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this:
- map view (no 3D view)
- color of each point should depend on z-value.
- I want to define my own color scale
- plot should... (1 Reply)
Discussion started by: karman
1 Replies
5. Programming
Hi there,
I am using the STL map and I print the map using:
map <string, float> ngram_token_index ;
map <string, float>::iterator map_iter ;
//read the map
...
// print the map
for ( map_iter = ngram_token_index.begin() ; map_iter != ngram_token_index.end() ; map_iter++ )
cout << ... (2 Replies)
Discussion started by: superuser84
2 Replies
6. HP-UX
Hi, I'm trying to map a vi editor key to some commands. I'm using HP-UX 11.11. the command looks like
map ~cmnt o * Suman Satpathy : <Esc> :r! date "\%d\%m\%y" <Esc> j$J
basically my idea is to map a shortcut for my commentlines.
but when I run the shortcut it inserts the line as below
*... (1 Reply)
Discussion started by: sumansatpathy
1 Replies
7. Programming
class tst
{
public:
tst() {
cout<<"ctor tst()\n";
}
tst(const tst& ob) {
cout<<"cp ctor tst()\n";
}
~tst()
{
cout<<"dtor tst()\n";
}
};
map<string,tst> mp;
int main(void)
{
mp;
//mp=tst();
} (1 Reply)
Discussion started by: johnbach
1 Replies
8. Web Development
Our site is currently "under abuse" from a botnet which is directing a small subset of internet users (not forum users) to a rarely used full page advertising URL and attempting to redirect the user, via that URL to other web sites. This is a kind of "spam" botnet; using a URL redirection... (16 Replies)
Discussion started by: Neo
16 Replies
9. AIX
Some storage/disks have been added to an existing AIX 6.1 server. The admin sent me the list of hdisk#'s for the new disks, but I need the corresponding rhdisk# for the same hdisk. (I know from past experience that the rhdisk that maps to an hdisk is not always the same number. For instance,... (5 Replies)
Discussion started by: sbrower
5 Replies
ypmatch(1) General Commands Manual ypmatch(1)
NAME
ypmatch - print values of selected keys in Network Information Service map
SYNOPSIS
domain]
Remarks
The Network Information Service (NIS) was formerly known as Yellow Pages (YP). Although the name has changed, the functionality of the
service remains the same.
DESCRIPTION
prints the values associated with one or more keys in a Network Information Service (NIS) map specified by mname. The mname can be either
a mapname or a map nickname. A map nickname is a synonym by which a NIS map can be referenced.
If multiple keys are specified, the same map is searched for an occurrence of each key. A match is made only when the case and length of a
key is the same as that stored in the database. No pattern matching is available. If a key is not matched, a diagnostic message is pro-
duced.
Options
recognizes the following command-line options:
Before printing the value associated with a key,
print the key followed by a colon This option is useful if the keys are not part of the values (as in a map), or so many
keys were specified that the output could be confusing.
Inhibit the translation of a map's
nickname to its corresponding mapname. For example, fails because there is no map named whereas, is translated to
Specify a
domain other than the default domain, that is, the one returned by (see domainname(1)).
Display the
nickname for each NIS map.
AUTHOR
was developed by Sun Microsystems, Inc.
SEE ALSO
domainname(1), ypcat(1), ypserv(1M), ypfiles(4).
ypmatch(1)