By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,696 Members | 1,462 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,696 IT Pros & Developers. It's quick & easy.

Find a character in a string, at a specified position. How do you do this? Any help will be appreciated....

P: n/a
Find a character in a string, at a specified position. How do you do
this? Any help will be appreciated....
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Looks Like Trent wrote:
Find a character in a string, at a specified position. How do you do
this? Any help will be appreciated....


std::string q ("daddy");
assert('y' == q[4]);

Now what does your C++ tutorial say about strings?

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces

Jul 22 '05 #2

P: n/a
"Looks Like Trent" <tr***********@gmail.com> wrote in message
Find a character in a string, at a specified position. How do you do
this? Any help will be appreciated....


Not sure what you're after. Look at std::string::find or std::find, or just
std::string::operator[](size_type).
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.