I am using O'reilly's Practical C++ Programming book in its 2nd edition. I have to create a program to complete the following question:

Write a function begins(string1, string2) that returns true if string1 begins string2.

This was confusing to me at first, and I think poorly written. From what I understand, I need to write a program that inputs a first string, and then a second string. Then, I guess it should input a third string - containing both first and second strings in any order - and then output true or false depending on the order..

As an example: Enter your first name, Enter your last name, Enter your Full name (either firstname first or firstname last), and then output true or false depending on the circumstances.., etc. I assume I can use a IF statment to determine the order of the strings..?

Please let me know if my grasp on the question is correct, or if I am way off.

I have the code started, and need some help - but I wanted to make sure I was approaching the question correctly before I flood the thread with questions


Thanks all =)