clearKey()  get()

Chapter 5: General Objects and Methods

get()

Description

Retrieves a string pair or string element from clMap object, depending on the parameter provided. There are two methods.

Syntax

int get(string key, string *pElement);

Parameter

Description

key

String of the key that looks up the element.

pElement

Pointer to the string to receive the element data that is paired with the supplied key.

Return value

Integer. Returns 1 if data is retrieved; otherwise, returns 0.

Usage

Takes a string (key) and a string pointer (pElement) as parameters. The first string parameter is used as the key to retrieve the corresponding element. The string pointer parameter is used for returning retrieved data.

Pointer to object

Object

string myElement;

pclMapObj->get    ("myKey",&myElement);

string myElement;

myClMapObj.get("myKey",&myElement);





Copyright © 2005. Sybase Inc. All rights reserved. get()

View this book as PDF