Em có viết 1 đoạn code C ngắn thế này để tập đọc, ghi file. Thế mà đến lúc Compile, lỗi thì ko nhiều. chỉ có 1 lỗi cực kì thú vị mà em mò cả tối rồi vẫn chưa fix được.
Các bác giúp em với !!!
ai:
Các bác giúp em với !!!

Mã:
#include<stdio.h>#include<stdlib.h>
#include<cstdio>
#include<iostream>
#include<windows.h>
using namespace std;
int main() {
char b[10],out[10];
int x;
const char *a = "C:/Users/QuanTD/Desktop/H.I.3 Auto/Number.txt";
file = fopen(a, "r");
file = fopen(a, "w");
fgets(b,10,file);
x = atoi(b);
x++;
itoa (x,b,10);
itoa (x,out,16);
cout << "Nguyenducthang" << out << endl;
fputs(b,file);
Sleep(5000);
fclose(file);
return 0;
}
