spintf

#include <stdio.h>
#include <stdlib.h>

int main(int argc, const char *argv[])
{
    char kk[100] = {0};      可以是buffer
    int i = 764;

    sprintf(kk,"echo %d >> filename",i);

    printf("%s\n",kk);

    system(kk);
    

    return 0;
}


你可能感兴趣的:(System,buffer,include)