Click here to Skip to main content
16,004,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am needing help checking for a string from a text file that is stored on my computer.. pseudo example
if String = x
{
Sleep(100)
}
else
{
exit(0)
}

im just trying to check the text file for a line of text then return a value based on that line.. like for example if the string is "continue" then I would like it to continue else exit(0)

What I have tried:

Noting really because I don't have much knowledge here.
Posted
Updated 28-Oct-17 19:00pm
v2

1 solution

You need to learn the basics of C++ as your code is not remotely related the problem, it is not even correct C++.
reading a file is a generic operation, there is heaps of examples on internet and a lot of tutorials.

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
Any failure of you will help you to learn what works and what don't, it is called 'trial and error' learning.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900