Hey everyone!
I can't get the following code compile under borland compiler:
Warning clock.c 11: Nonportable pointer conversion in function main
Turbo Link Version 5.0 Copyright (c) 1992 Borland International
Error: Undefined symbol __pclose in module clock.c
Error: Undefined symbol __popen in module clock.c
Available memory 4145152
I appreciate any help!
Code:
#include <stdio.h>
#define popen _popen
#define pclose _pclose
int main(){
FILE *fp;
char line[130];
fp = _popen("netstat -n", "r");
while ( fgets( line, sizeof line, fp))
{
printf("%s", line);
}
_pclose(fp);
getch();
return(0);
}