You have a loop. The "system" command is executed each time in the loop. So when you enter "Q" to exit the loop, all the commands are executed again. That's what the printf should have shown you.
So what happens when you execute the second system () call? I don't expect it to work. I expect it to overwrite the output of the first system () command.
I fixed how I exit the loop but overwriting was never a problem. The code that uses the file was not incorporated yet.
Here, if you're interested is the latest (and still growing version). Thanks for your help.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main (int argc, const char * argv[]) {
// http://simbad.u-strasbg.fr/simbad/sim-basic?Ident=vega&submit=SIMBAD+search
char *star, *path, *simbad;
FILE *file;
star = (char *)calloc(30, sizeof(char));
path = (char *)calloc(250, sizeof(char));
simbad = (char *)calloc(250, sizeof(char));
do
It is made in grey suede with
Louis Vuitton Grey Suede
Grey suede bag Zara
quot;grey suede is my new material
So what happens when you execute the second system () call? I don't expect it to work. I expect it to overwrite the output of the first system () command.
I fixed how I exit the loop but overwriting was never a problem. The code that uses the file was not incorporated yet.
Here, if you're interested is the latest (and still growing version). Thanks for your help.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main (int argc, const char * argv[]) {
// http://simbad.u-strasbg.fr/simbad/sim-basic?Ident=vega&submit=SIMBAD+search
char *star, *path, *simbad;
FILE *file;
star = (char *)calloc(30, sizeof(char));
path = (char *)calloc(250, sizeof(char));
simbad = (char *)calloc(250, sizeof(char));
do