A C++ map definitely isn't a hash table. A hash table is a map, but not all maps are hash tables... Hash tables have strong advantages but plenty of pitfalls. A C++ map is a more general purpose list-based thing.
That's beside the point here, though. You're checking for the string 'end', which your document doesn't have, so your loop will never stop; so you may be trying to add strings which weren't read to your map.
Why not ask cin when it's done instead?
Also, put debug statements in your code. Output lines to cerr so you can track what your program's doing.
Last edited by Corona688; 06-18-2010 at 02:19 PM..
Dear colleagues,
One of my friend have a problem with c code. While compiling a c program it displays a message like
"array type has incomplete element type". Any body can provide a solution for it.
Jaganadh.G (1 Reply)
Hi
i have the following structure
struct S
{
char Mod_num;
char val;
char chr_nm_cd;
}
I am reading a 2GB file and inserting into the structure and writing into a vector.
I feel like only vector will be a right option. I tried with multimap but it is memory intensive and hence i... (1 Reply)
Hi! I need to make dynamic multidimensional arrays using the vector class. I found in this page How to dynamically create a two dimensional array? - Microsoft: Visual C++ FAQ - Tek-Tips the way to do it in 2D, and now i'm trying to expand it to 3D but i don't understand how is the operator working,... (1 Reply)
Hi all,
I have a vector,the type of the element within it is list<int>,and i wanna sort this vector.So i implemented a function as a predicate for sort(the STL algorithm).Problem came when i missed the bold part in my code,g++ generated lots of error messages.And after i added the bold... (4 Replies)
Hi all, from my understanding I understand that I can use array in this manner.
struct test
{
int a;
int b;
int c;
};
test testing; //creating an array with the structer type
testing.a=1;
testing.b=2;
testing.c=3;
If I'm not wrong we can use array in this manner,... (12 Replies)
hello guys.
i'm new to c++. i've problem using two dimensional vector.
i've a project of making conway's game of life. this is the code that i have made so far.
my problem is how can i give a two dimensional vector through main.
glider.vec1 = vec; is not correct way to give a two... (2 Replies)
In AWK
For 3 individual vectors of the form:
-2.772 -9.341 -2.857
-5.140 -6.597 -1.823
-2.730 -5.615 1.159
I would like to write a script that parses line by line to (i) normalise, (ii) divide by the norm for *each* vector.
I.e.
sqrt(-2.772^2 + -9.341^2 + -2.857^2)=10.154
... (4 Replies)
Hello,
Trying to challenge myself with C++ STL.
I want to read in data from file and do some calculation, adapted from an exercise of a book (C++ for engineers and scientist, 3rd Ed, Gary Bronson).
infile is like:
ID Name Course Credit Grade
2333021 Bokow,R. NS201 3 A
2333021 Bokow,R.... (19 Replies)
Discussion started by: yifangt
19 Replies
LEARN ABOUT DEBIAN
nisplus_table
NISPLUS_TABLE(5) File Formats Manual NISPLUS_TABLE(5)NAME
nisplus_table - Postfix NIS+ client
SYNOPSIS
postmap -q "string" "nisplus:[name=%s];name.name."
postmap -q - "nisplus:[name=%s];name.name." <inputfile
DESCRIPTION
The Postfix mail system uses optional lookup tables. These tables are usually in dbm or db format. Alternatively, lookup tables can be
specified as NIS+ databases.
To find out what types of lookup tables your Postfix system supports use the "postconf -m" command.
To test Postfix NIS+ lookup tables, use the "postmap -q" command as described in the SYNOPSIS above.
QUERY SYNTAX
Most of the NIS+ query is specified via the NIS+ map name. The general format of a Postfix NIS+ map name is as follows:
nisplus:[name=%s];name.name.name.:column
Postfix NIS+ map names differ from what one normally would use with commands such as niscat:
o With each NIS+ table lookup, "%s" is replaced by a version of the lookup string. There can be only one "%s" instance in a Postfix
NIS+ map name.
o Postfix NIS+ map names use ";" instead of ",", because the latter character is special in the Postfix main.cf file. Postfix
replaces ";" characters in the map name by "," before making NIS+ queries.
o The ":column" part in the NIS+ map name is not part of the actual NIS+ query. Instead, it specifies the number of the table column
that provides the lookup result. When no ":column" is specified the first column (1) is used.
EXAMPLE
A NIS+ aliases map might be queried as follows:
alias_maps = dbm:/etc/mail/aliases,
nisplus:[alias=%s];mail_aliases.org_dir.$mydomain.:1
This queries the local aliases file before the NIS+ file.
SEE ALSO postmap(1), Postfix lookup table manager
README FILES
Use "postconf readme_directory" or "postconf html_directory" to locate this information.
DATABASE_README, Postfix lookup table overview
LICENSE
The Secure Mailer license must be distributed with this software.
AUTHOR(S)
Geoff Gibbs
UK-HGMP-RC
Hinxton
Cambridge
CB10 1SB, UK
Adopted and adapted by:
Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA
NISPLUS_TABLE(5)