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

  • Thread starter Looks Like Trent
  • Start date
L

Looks Like Trent

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

Phlip

Looks said:
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?
 
S

Siemel Naran

Looks Like Trent said:
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::eek:perator[](size_type).
 

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
474,181
Messages
2,570,970
Members
47,537
Latest member
BellCorone

Latest Threads

Top