Thread: Comparing user input to string in .txt file

  1. #1
    Registered User
    Join Date
    Jan 2020
    Posts
    7

    Question Comparing user input to string in .txt file

    Comparing user input to string in .txt file-capture3-jpg
    As the title says, i need help in writing a code where a user inputs a word and it compares the word in a .txt file and print it to the console. Attached is how the file is read
    Last edited by Joe1709; 01-10-2020 at 03:43 PM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    38,165
    Well there is enough info in your previous thread to at least have a go at some code.
    Problems with Reading and copying string from txt to console
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 02-07-2013, 05:02 AM
  2. comparing user input with a string
    By Shingetsu Kurai in forum C++ Programming
    Replies: 5
    Last Post: 08-06-2011, 10:34 PM
  3. HELP! Reading from txt file and comparing to input
    By disco_dog in forum C Programming
    Replies: 7
    Last Post: 12-05-2004, 06:30 AM
  4. comparing user input
    By lambs4 in forum C Programming
    Replies: 5
    Last Post: 12-15-2002, 10:28 AM
  5. Problem comparing string from text file with string constant
    By XenoCodex Admin in forum C++ Programming
    Replies: 3
    Last Post: 07-25-2002, 10:17 AM

Tags for this Thread