input problem

K

Kay

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);
 
E

Eric Sosman

Kay said:
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 ];

Stop right there; you're in the wrong newsgroup.
comp.lang.c++ is across town in the high-rent district.
 
J

Jack Klein

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());

[snip]

Your biggest input problem is that you are "inputting" C++ code to
comp.lang.c.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top