-
May 26th, 2010, 11:31 AM
#1
How to split string into char array
Hello!
I have to input Full Name in a char with no more than 50 symbols then I have to split it into 3 chars - First Name, Second Name and Family Name. I've tried so hard but I was not able to get to solution so I decided to ask here. I hope you will help me!
Thanks!
-
May 26th, 2010, 11:57 AM
#2
Re: How to split string into char array
- Did you ever work with arrays?
- Did you ever work with char arrays?
- Is there a particular reason to not use MFC CString or STL std::string classes?
- Do you know in what format you get in input Full Name string?
- Did you try to search MSDN for C-runtime string functions?
- ...
Victor Nijegorodov
-
May 26th, 2010, 12:02 PM
#3
Re: How to split string into char array
Thanks! I see that I won't find any help or any kind of direction...
I'm noob... I've searched so much in google but I didn't find anything which could help me. I thought that I would receive a little bit of help but no...
Everyone is too smart to help the noob ones... Bye, I won't spam your forum!
-
May 26th, 2010, 12:05 PM
#4
Re: How to split string into char array
***?! Deleting posts... I got it! Please delete this thread and my profile!
-
May 26th, 2010, 02:12 PM
#5
Re: How to split string into char array
Originally Posted by Seishin
Thanks! I see that I won't find any help or any kind of direction...
I'm noob... I've searched so much in google but I didn't find anything which could help me. I thought that I would receive a little bit of help but no...
Everyone is too smart to help the noob ones... Bye, I won't spam your forum!
Feel better? Victor asked some reasonable questions. I don't see anything for you to get offended or defensive about. Sometimes more information is needed before help can be provided.
In questions 1 and 2, Victor is trying to gauge your level of experience so as to properly word his answer.
Question 3 is asking about classes that make the task easier.
The solution depends on the answer to question 4,
5, can help determine if you know what documentation is out there and steer you towards it if you don't.
That's all reasonable.
Last edited by GCDEF; May 26th, 2010 at 02:16 PM.
-
May 26th, 2010, 02:16 PM
#6
Re: How to split string into char array
VictorN's response is a good starting point so we can understand what you do or do not know.
Your attitude will not get you far on this (or most) forums when people who respond to you are willing to help (but remember they are donating their time), and are trying to gather information.
It also is very useful (and mentioned in the posting guidelines) to show the code you've already written and point out specifically where you are having a problem.
Be sure to rate those who help!
-------------------------------------------------------------
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
-
May 26th, 2010, 04:10 PM
#7
Re: How to split string into char array
Originally Posted by Seishin
Hello!
I have to input Full Name in a char with no more than 50 symbols then I have to split it into 3 chars - First Name, Second Name and Family Name. I've tried so hard but I was not able to get to solution so I decided to ask here. I hope you will help me!
Thanks!
http://www.cplusplus.com/reference/string/string/
Read about string::substr() and string::find_first_of()
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|