g++はそれをコンパイルすることすらしません。どこが間違っていたの?エラーメッセージは次のとおりです。
gcc sign.c sign.c:関数âmainâ:sign.c:35:2:警告:フォーマットは文字列リテラルではなく、フォーマット引数もありません[-Wformat- security]
================================================== ================================
#include "stdio.h"
int string_length(char str[]);
void string_sort(char s[]);
void string_sort(char s[])
{
char tmpt;
int i, j, len;
len=string_length(s);
for(i=0; i<len-1; i++){
for (j=i+1; j<len; j++){
if (s[i] > s[j]){
tmpt=s[i];
s[i]=s[j];
s[j]=tmpt;
}
}
}
}
int string_length(char str[]){
int i;
for(i=0; i<80; i++){
if(str[i]=='\0'){
return(i);
}
}
}
int main(){
char words[80];
scanf("%s", words);
printf(words);
string_sort(words);
printf(" ");
printf(words);
printf("\n");
while ( words != " "){
scanf("%s", words);
printf(words);
string_sort(words);
printf(" ");
printf(words);
printf("\n");
}
}