473,221 Members | 1,936 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,221 software developers and data experts.

defining keys

KK
How to define keys in c++??
can anyone help on this?

Jul 11 '06 #1
6 1638
"KK" <Ka****************@gmail.comwrites:
How to define keys in c++??
You can e.g. do the following.

int main()
{
int keys = 42;

return 0;
}
can anyone help on this?
Could you give more details on your need?
--
Marco Wahl

Jul 11 '06 #2
"KK" <Ka****************@gmail.comwrote:
How to define keys in c++??

int keys;
Oh, you say that's not what you meant? I guessed it
might not be. But since there is something like a googol
(google "googol") of different ways to interpret your
question, I just chose one at random.

If you would care to elaborate, perhaps I could be of
more help.

--
Cheers,
Robbie Hatley
East Tustin, CA, USA
lone wolf intj at pac bell dot net
(put "[usenet]" in subject to bypass spam filter)
http://home.pacbell.net/earnur/
Jul 11 '06 #3
KK posted:
How to define keys in c++??
can anyone help on this?

My guess wudda been:

#define keys
--

Frederick Gotham
Jul 11 '06 #4
KK wrote:
How to define keys in c++??
class keys { };

--
Salu2
Jul 11 '06 #5

"KK" <Ka****************@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
How to define keys in c++??
can anyone help on this?
In case the abundance of smart-ass answers hasn't clued you in... nobody
knows what you're talking about! :-)

If this is a database questions, then ask in a database newsgroup.

If you think it is actually a C++ _language_ question (the topic of this
newsgroup), then post back with some more details of what you're asking.
The word "keys" is just too general to know what you're referring to, and
isn't a term used in describing anything in the C++ language (at least not
that I'm aware of).

-Howard
Jul 11 '06 #6
"Howard" <al*****@hotmail.comwrote:
"KK" <Ka****************@gmail.comwrote:
How to define keys in c++??
can anyone help on this?

In case the abundance of smart-ass answers hasn't clued you in... nobody
knows what you're talking about! :-)

If this is a database questions, then ask in a database newsgroup.

If you think it is actually a C++ _language_ question (the topic of this
newsgroup), then post back with some more details of what you're asking.
The word "keys" is just too general to know what you're referring to, and
isn't a term used in describing anything in the C++ language (at least not
that I'm aware of).
Well, maps and multimaps use keys. Which can basically be any simple
type for which "<" is defined, so that maps can be ordered by keys.
Which is why I made some smartass comment about "int".

If I remember right, the code for that looks something like this:

typedef unsigned long student_id; // "key" type
typedef std::string student_name; // "value" type

std::map<student_id, student_nameStudentBody;

void AddStudent(student_id id, student_name name)
{
::StudentBody.insert(std::make_pair(id, name));
}

void DeleteStudent(student_id id)
{
::StudentBody.erase(id);
}

std::string GetName(student_id id)
{
return ::StudentBody[id];
}
I don't know if map keys is what the person had in mind though.
--
Cheers,
Robbie Hatley
East Tustin, CA, USA
lone wolf intj at pac bell dot net
(put "[usenet]" in subject to bypass spam filter)
http://home.pacbell.net/earnur/
Jul 11 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Pjotr Wedersteers | last post by:
Hello, I tried to create an array with 1000 cells, keys 0 thru 999 using $myarr = array (1000); But this leads to an array of 1 cell with value 1000; Now I have a workable solution for...
4
by: SilverShadow | last post by:
Hello, I'm having trouble with something that may be easily remedied. I use Cantera running on Python. I need to make multiple "Reactor()" objects and have them assigned a different (user...
1
by: Erik Max Francis | last post by:
I've come across a limitation in unpickling certain types of complex data structures which involve instances that override __hash__, and was wondering if it was known (basic searches didn't seem to...
0
by: OC | last post by:
Because of the requirements on a high-speed data entry form, I need to reliably trap certain keys (specifically the "/", "*", "-", and "+") keys on the 10-key pad and treat them as "Function keys"....
2
by: Hamish Symington | last post by:
Hello, I'm trying to re-code a site which I wrote in PHP into ASP.NET using Visual Basic .NET. Something PHP has which has proved invaluable is the concept of variable variables. I haven't...
0
by: mikkel | last post by:
Hi. I have two physical files on an iSeries (AS/400) box, from which I would like to make a join logical file. The files are in a master-detail setup, where the master table contains: -...
2
by: Charles Law | last post by:
I'll kick myself when you tell me, but ... I have a user control on a form, and I want the user control to see the arrow keys when I press them. If I press just about any other key the control's...
3
by: EllieT | last post by:
Hi all, I've been fiddling around with creating a new database (Access 2003, Windows XP) for work the past two weeks and am having trouble defining my own customized (yet still automatic) primary...
0
by: Menlalen | last post by:
K E Y S , A L I C I A M P 3 D O W N L O A D *Fallin 2001* 'Keys, Alicia - Fallin' (http://tinyurl.com/4zg3sr) (3:30 4.82Mb 192kbps) 'Keys, Alicia - Fallin (ft BustaRhymes and Rampage)'...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...

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.