Download this file
20 lines (18 with data), 536 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 | #include "Line.h"
bool Line::ReadLine(FILE* file) {
s_Text = "";
char LookChar = '\0';
unsigned int Start = ftell(file);
while((LookChar = fgetc(file))!='\n') {
if(LookChar == EOF) {
if(s_Text=="") return false;
else return true;
}
s_Text += LookChar;
}
unsigned int End = ftell(file);
fseek(file,Start,SEEK_SET);
char String[50];// Holds all of the string segments
int Number;// Holds all of the number segments
return true;
}
|
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.