testing-repository/Gtk3/gtk23/config-test.cpp

30 lines
532 B
C++
Raw Normal View History

2020-11-06 21:14:39 +08:00
#include "config-test.h"
void dale(const char str[])
{
printf("cpp43 by dale clack\n");
}
void config(const char str[])
{
//change content in "config" file
/*char str[57];
printf("Input config:");
scanf("%s",str);*/
freopen("config","w",stdout);
printf("%s",str);
fclose(stdout);
}
void test(char *str)
{
char str_tmp[57];
//Read content in "config" file
freopen("config","r",stdin);
scanf("%s",str_tmp);
//printf("config:%s\n",str);
fclose(stdin);
strcpy(str,str_tmp);
}