I have been working on a C++ project for the past 5 days/nights and it is due tonight at 9PM Pacific. I need to know how exactly I can take the functions I've written and test them... and I also need to figure out how to take the information from the .txt file and match it against the keyboard input. If there is any way you could help me out I'd really appreciate it. Thanks so much. It is project 5 on the above website.

I'm using Microsoft Visual Studio.NET.  

Hello Farica, thanks for the question.

My best advice to you would be to read the strings from the keyboard into an array and tokenize it using the function "strtok" to compare tokenized output from the array against the array of criterion lines. Perhaps a double for-loop and a bunch of "strcmp"'s are in order. To test your functions, why don't you run a sample program. Type pre-defined strings to compare against instead of reading keyboard input until you can figure that out. I wish you luck, as this seems like a tricky project.

I hope this information was helpful.

- Eddie


All Answers

Answers by Expert:

Ask Experts




I can answer questions about the C++ language, object oriented design and architecture. I am knowledgable in a lot of the math that goes into programming, and am certified by ExpertRating.com. I also know a good deal about graphics via OpenGL, and GUIs.


I have completed numerous games and demos created with the C++ programming language. Currently employed as a software engineer in the modeling and simulation field. I have about 7 years experience.

©2016 About.com. All rights reserved.