OpticNurve
Programmer
How would I put an entire file into an array in C... where each line is an element in the array?
In perl or php its just file() ... Plus, how do I grab a certain amount of characters from that line?
For instance in PHP I would do this:
// Opens the file specified
$fp = @fopen($nsffile, "r"
// Stores it into an array - each line an element
$f_contents = file($nsffile);
// Grabs all chars from column 3 up to 16 chars on line
// $i ($i being whatever)
$aa0_subid = substr($f_contents[$i], 3, 16);
----------------------------
I would like to do this in C... anyone know how?
TIA
In perl or php its just file() ... Plus, how do I grab a certain amount of characters from that line?
For instance in PHP I would do this:
// Opens the file specified
$fp = @fopen($nsffile, "r"
// Stores it into an array - each line an element
$f_contents = file($nsffile);
// Grabs all chars from column 3 up to 16 chars on line
// $i ($i being whatever)
$aa0_subid = substr($f_contents[$i], 3, 16);
----------------------------
I would like to do this in C... anyone know how?
TIA