迭代

#include <stdio.h>
#include  <stdlib.h>
#include <string.h>
typedef enum {false=0,true=1}bool;
bool str_in(char **);
void str_sort (const char *[],int );
void swap(void **p1,void **p2);
void str_out (char *[],int );

const size_t BUFFER_LEN =256;
const size_t NUM_P =50;

int main ()
{
    char *ps[NUM_P];
    int count =0;
    
    printf("\n Enter successive lines ,pressing Enter at the end of");
    for (count =0;count<NUM_P;count++)
        if(!str_in (&ps[count]))
            break;
        
    str_sort(ps,count);
    str_in (ps,count);
    return 0;
}
    bool str_in(char **pString)
    {
        char buffer[BUFFER_LEN];
        if(gets(buffer)==NULL)
        {
            printf()
            
        }
        
    }

 

posted @ 2016-06-18 13:23  V5八旗  阅读(118)  评论(0编辑  收藏  举报