954,219 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

capturing text

heya guys I mud and I use a client that is not all that powerful I'm new to c+ but have spent the last 2 weeks reading hard on it, I'm trying to write a few scripts and my client doesnt have all the necesary commands heres what I need in c+

need a formula for where i get a repeated word in a string ie

somewhere-
somewhere-
somewhere-
somewhere-

now what i want to do is replace somewhere with
1-
2-
3-
4-
whats the fomula to do this?

also I want to capture certain line of text (room names) these room names always end with [obvious exits] 1 line directly below, any ideas how to do this?

hope to get some feed back thanks for reading :)

dejaqkl
Newbie Poster
1 post since Aug 2003
Reputation Points: 10
Solved Threads: 0
 

I'm not sure about your question! Are those variables or constants?
enum (something that makes sense without the brackets) { somewhere=1,somewhere=2,somewhere=3,somewhere=4}---constants
and maybe u can use the typedef keyword for using one word as a synonym but u want them to be replaced by numbers so it's better to use const.

camelNotation
Posting Whiz in Training
208 posts since Sep 2003
Reputation Points: 16
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You