#include<stdio.h>
#include<iostream>
int main(int argc, char *argv[])
{
printf("123456789\n");
uint64_t cnt = 0;
FILE* fd = NULL;
char *buf = "123456";
while (1)
{
fd = fopen("C:\\Users\\sea\\Desktop\\VS_TEST\\123.txt", "a");
if (fd == NULL)
{
std::cout << "error" << std::endl;
system("pause");
}
fprintf(fd, "%s\n", buf);
std::cout << cnt++ <<std::endl;
fclose(fd);
}
system("pause");
return 0;
}
#include<iostream>
int main(int argc, char *argv[])
{
printf("123456789\n");
uint64_t cnt = 0;
FILE* fd = NULL;
char *buf = "123456";
while (1)
{
fd = fopen("C:\\Users\\sea\\Desktop\\VS_TEST\\123.txt", "a");
if (fd == NULL)
{
std::cout << "error" << std::endl;
system("pause");
}
fprintf(fd, "%s\n", buf);
std::cout << cnt++ <<std::endl;
fclose(fd);
}
system("pause");
return 0;
}