Skip to content
Advertisement

Tag: txt

Extraction of string and integer from txt

I’m trying to make a simple scanner reader to read from a txt stored in C:UsersjamesDesktopprojectfiles and it’s called data “data.txt”, the thing is that the information stored is like this: So as you can see the spaces between the string and the integer that I want o extract are random. I was trying to make this: But the split

how to properly check if a string is in txt file

I’m writing a program that manages a library. This part of the program is where you borrow a book, but only if it’s in the library, so I check if the book is in the library but it always comes back negative even if the string is in the library txt file. What should I do? Answer You are just

Advertisement