Home » Community » Forums » » Algorithmic Forays Part 5
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 Algorithmic Forays Part 5
Post Reply 
Like always...
good work :) nothing to add
keep it up!

 User Rating: 1151   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Thanks !

I'm a little worried about the "pace" of the articles which
seems "killer" to me. I wonder if people with no previous
experience in these topics manage to follow through...

 User Rating: 1023   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

string scanner::preprocess(string in)
{

string out="";

string::const_iterator c = in.begin(), up = c + 1;

// in this loop c is the current char of in, up is the next one
//
for (; up != in.end(); ++c, ++up)
{

out.push_back(out,*c);

if ((isalnum(*c) || *c == ')' || *c == '*' || *c == '?') &&
(*up != ')' && *up != '|' && *up != '*' && *up != '?'))
out.append('.');

}

// don't forget the last char ...
//
if (c != in.end())
out.push_back(*c);

return out;
}



This function why doesnt it works?? it says u cant use push_back with the string out??
any ways out how could i change it ?

 User Rating: 1015    Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: