ABC
ASF
DFS
ASS
ABC <--- Duplicate
JJK
I want to store above char in an arry, but I'm not sure I'm right or not
anyone can guide me or give me some suggestions, Thx?
for( int i = 0; i < 7; i++)
array[i] = "\n";
While( !feof(ptr)){
fscanf(fptr, "%s", port );
for(int i = 0; i < 7; i++ ){
if( array[i] != port && array[i] == "\n" ){
strcpy( array[i], port );
}
}
ASF
DFS
ASS
ABC <--- Duplicate
JJK
I want to store above char in an arry, but I'm not sure I'm right or not
anyone can guide me or give me some suggestions, Thx?
for( int i = 0; i < 7; i++)
array[i] = "\n";
While( !feof(ptr)){
fscanf(fptr, "%s", port );
for(int i = 0; i < 7; i++ ){
if( array[i] != port && array[i] == "\n" ){
strcpy( array[i], port );
}
}
Comment