It even protects against overflows if you tell it to (%20s, so it doesn't overrun a 21-char buffer).
Those are only concerns of advanced programmers. I can't predict the situations even you pointed it out.
BTW, the last version has a bug if there is a blank line in the input file....(No worry, I'll try to fix it myself.)
The biggest point for me is from the lines:
I did not know this way to assign a map_pair so much simply.
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)
Can someone tell me how to do this?
Just a thought that entered my mind when learning about structs.
First thought was:
struct one
{
struct two;
}
struct two
{
three;
}
one->two->three
would this be how you would access "three"? (1 Reply)
I modified some code I found on Wikipedia concerning maps to see if it would work before applying it to a project I'm working on that has a similar idea.
What I would want is for a user to be able to enter sentences and then be able to distinguish how many times a the person entered a word in a... (4 Replies)
Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks.
... (1 Reply)
Hi,
I have received an application that stores some properties in a file. The existing struct looks like this:
struct TData
{
UINT uSizeIncludingStrings;
// copy of Telnet data struct
UINT uSize;
// basic properties:
TCHAR szHost; //defined in Sshconfig
UINT iPortNr;
TCHAR... (2 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)
Discussion started by: chrisjorg
4 Replies
LEARN ABOUT SUSE
xkballoccompatmap
XkbAllocCompatMap(3) XKB FUNCTIONS XkbAllocCompatMap(3)NAME
XkbAllocCompatMap - Allocate a new compatibility map if you do not already have one available
SYNOPSIS
Status XkbAllocCompatMap (XkbDescPtr xkb, unsigned int which, unsigned int num_si);
ARGUMENTS
- xkb keyboard description in which to allocate compat map
- which
mask of compatibility map components to allocate
- num_si
number of symbol interpretations to allocate
DESCRIPTION
xkb specifies the keyboard description for which compatibility maps are to be allocated. The compatibility map is the compat field in this
structure.
which specifies the compatibility map components to be allocated (see XkbGetCompatMap). which is an inclusive OR of the bits shown in Ta-
ble 1.
Table 1 Compatibility Map Component Masks
---------------------------------------------------------------
Mask Value Affecting
---------------------------------------------------------------
XkbSymInterpMask (1<<0) Symbol interpretations
XkbGroupCompatMask (1<<1) Group maps
XkbAllCompatMask (0x3) All compatibility map components
num_si specifies the total number of entries to allocate in the symbol interpretation vector (xkb.compat.sym_interpret).
XkbAllocCompatMap returns Success if successful, BadMatch if xkb is NULL, or BadAlloc if errors are encountered when attempting to allocate
storage.
STRUCTURES
typedef struct {
KeySym sym; /* keysym of interest or NULL */
unsigned char flags; /* XkbSI_AutoRepeat, XkbSI_LockingKey */
unsigned char match; /* specifies how mods is interpreted */
unsigned char mods; /* modifier bits, correspond to eight real modifiers */
unsigned char virtual_mod; /* 1 modifier to add to key virtual mod map */
XkbAnyAction act; /* action to bind to symbol position on key */
} XkbSymInterpretRec,*XkbSymInterpretPtr;
DIAGNOSTICS
BadAlloc Unable to allocate storage
BadMatch A compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise
invalid
SEE ALSO XkbGetCompatMap(3)NOTES
Note that symbol interpretations in a compatibility map (the sym_interpret vector of XkbSymInterpretRec structures) are also allocated
using this same function. To ensure that there is sufficient space in the symbol interpretation vector for entries to be added, use XkbAl-
locCompatMap specifying which as XkbSymInterpretMask and the number of free symbol interpretations needed in num_si.
X Version 11 libX11 1.3.2 XkbAllocCompatMap(3)