Author |
Message |
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
|
Back to top |
|
|
Snrrrub Novice
Joined: May 29 2008 Posts: 37 Offline
|
Posted: Mon Aug 25, 2008 10:03 am Post subject: |
|
|
|
|
More importantly, you're using C++'s std::string class so you should avoid functions like strcpy and strcmp entirely. Instead of using strcpy, use the assignment operator (str1 = str2) and instead of strcmp, use the equality operator (if (str1 == str2)).
I strongly recommend using std::string instead of C-style strings where possible - you'll significantly reduce the likelihood of errors and you'll waste less time writing repetitive code.
-Snrrrub |
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Mon Aug 25, 2008 11:26 pm Post subject: |
|
|
|
|
What should I use from the C++ std::string if I would like a program to find a string from a string
for an example:
user types in a sentance hello my name is john
program looks if user said hello and if he did it says hello john |
|
Back to top |
|
|
k0zy Server Help Squatter
Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
|
Back to top |
|
|
|