Reading and printing out variables via fread +REP
#3

If they are split by lines (\r\n or \n) it's way easier to use just fread.

fread will read one line only, so if you do fread twice after opening, the string will contain the second line.
It will return 1 if there is content, 0 if not.

fseek is possible too, but you need to know the exact position of the starting point of line 2 (which is in your case length of playername plus 1 or 2 (depending on if you used "\n" or "\r\n")).
Reply


Messages In This Thread
Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 13:50
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 13:56
Re: Reading and printing out variables via fread +REP - by NaS - 12.04.2016, 14:03
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 14:16
Re: Reading and printing out variables via fread +REP - by NaS - 12.04.2016, 14:34
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 15:44
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 15:55
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 15:56
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 16:09
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 16:12
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 16:18
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 16:20
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 16:22
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 16:24
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 16:26
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 16:31
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 16:33
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 16:37
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 16:37
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 16:41
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 16:44
Re: Reading and printing out variables via fread +REP - by NaS - 12.04.2016, 16:49
Re: Reading and printing out variables via fread +REP - by Godey - 12.04.2016, 16:52
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 16:55
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 17:05
Re: Reading and printing out variables via fread +REP - by NaS - 12.04.2016, 17:34
Re: Reading and printing out variables via fread +REP - by Amit1998 - 12.04.2016, 18:03
Re: Reading and printing out variables via fread +REP - by NaS - 12.04.2016, 18:30
Re: Reading and printing out variables via fread +REP - by Godey - 13.04.2016, 02:04
Re: Reading and printing out variables via fread +REP - by Crayder - 13.04.2016, 03:11
Re: Reading and printing out variables via fread +REP - by Amit1998 - 13.04.2016, 15:27
Re: Reading and printing out variables via fread +REP - by NaS - 13.04.2016, 15:38

Forum Jump:


Users browsing this thread: 5 Guest(s)