Nico Heinze wrote:
> --- In [email protected], "k sudha" <[EMAIL PROTECTED]> wrote:
>> plz solve this qs for me
>>
>> Write a program in C++ that transforms an extended name
>> into its initial form, for example
>> Sudhansh Kumar Sharma to S. K. Sharma.
> <snip>
> 
> First:
> why should we. Show us what YOU have done so far, then we will help
> you with particular trouble you might encounter. If you exactly name
> what trouble you have. No one here will do your homework. At least no
> one reasonable.
> 
> Second:
> Don't "hijack" a completely different thread. Starting a new thread
> (as for your question) is as simple as sending an email to
> [EMAIL PROTECTED] ; that's it. And I sincerely doubt that this is asked
> too much of you.
> 
> Regards,
> Nico

size_t x, y;
BString Name("Sudhansh Kumar Sharma");
Block<BString> SplitData;

Name.Explode(SplitData, ' ');
y = SplitData.GetSize();
if (y)
{
   y--;
   for (x = 0; x < y; x++)  SplitData[x] = SplitData[x].Left(1) + ".";
}
Name = BString::Implode(SplitData, ' ');
printf("%s\n", *Name);


<grin>  (Let's see him explain that to his professor.  Or even compile 
it in the first place.  As long as no one tells the OP how to compile 
it, this is an excellent way to answer homework problems.  It gives a 
working solution in C++, just nothing they are familiar with.  Does this 
make me unreasonable...or just evil?)

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* VerifyMyPC 2.4
Change tracking and management tool.
Reduce tech. support times from 2 hours to 5 minutes.

http://www.CubicleSoft.com/VerifyMyPC/

Reply via email to