Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

client server communication

Status
Not open for further replies.

oilerscrazy

Programmer
Joined
Jan 21, 2002
Messages
5
Location
CA
I need to request a service from a server. I have written the program for both. The client sends a text request and the server tokenizez(sp??) the string into 3 tokens. I need to use the tokens now in a switch statement (or suggest some other way, want to avoid if/else)

The problem is that I can't switch with a string. IO tried enum but it didn't work out, I have never used it before, but anyway. I need some help. how can I turn the strings into int values like 'get' = 1

thanks
 
What about something like encapsulating it in a struct with an ID integer?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top