You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
414 B
22 lines
414 B
#include<stdio.h>
|
|
#include<stdlib.h>
|
|
#include<string.h>
|
|
int main() {
|
|
FILE *fpointer;
|
|
char str[60];
|
|
char strb[60];
|
|
int i=0;
|
|
int ib=0;
|
|
if ((fpointer = fopen("test.cfg","r")) == NULL){
|
|
printf("Error opening file");
|
|
exit(1);
|
|
}
|
|
while( fgets (str, 60, fpointer)!=NULL ) {
|
|
while (i<60){
|
|
if(str[i]!=' '){strb[ib]=str[i];i++;ib++;}else{i++;}
|
|
}
|
|
puts(strb);i=0;ib=0;
|
|
}
|
|
fclose(fpointer);
|
|
return 0;
|
|
}
|