Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- int main(void){
- FILE *arq;
- double aux[]= {4, 2, 6};
- arq = fopen("teste.txt", "w+b");
- if(arq == NULL){
- cout << "Erro";
- exit(1);
- }
- fwrite(&aux, sizeof(double), 3, arq);
- fclose(arq);
- }
Add Comment
Please, Sign In to add comment