input problem
From: Kay (ericjo92003_at_yahoo.com.hk)
Date: 08/31/04
- Next message: Dan Pop: "Re: addresses and integers"
- Previous message: beliavsky_at_aol.com: "Re: Two Questions about "strlen", "strcat" and "strcpy""
- Next in thread: Eric Sosman: "Re: input problem"
- Reply: Eric Sosman: "Re: input problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 01 Sep 2004 01:21:15 +0800
If my input is an integer, how can I compare w/ the queue
(mode shows as below) in order to display the context containing the
integer that I input ?
char *name, *cuisine, *mode;
//change type of name of restaurant from string to char
name = new char[temp_name.length() + 1 ];
strcpy( name, temp_name.c_str());
//change type of name of cuisine from string to char
cuisine = new char[temp_cuisine.length() + 1 ];
strcpy( cuisine, temp_cuisine.c_str());
//change type of operation mode from string to char
mode = new char[temp_mode.length() + 1 ];
strcpy( mode, temp_mode.c_str());
//cout << name << cuisine << mode << endl;
--> mode QueueInsert( ReCuMo, name, cuisine, mode);
- Next message: Dan Pop: "Re: addresses and integers"
- Previous message: beliavsky_at_aol.com: "Re: Two Questions about "strlen", "strcat" and "strcpy""
- Next in thread: Eric Sosman: "Re: input problem"
- Reply: Eric Sosman: "Re: input problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|