Guest User

Untitled

a guest
Dec 16th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. int main(void){
  6. FILE *arq;
  7. double aux[]= {4, 2, 6};
  8. arq = fopen("teste.txt", "w+b");
  9. if(arq == NULL){
  10. cout << "Erro";
  11. exit(1);
  12. }
  13. fwrite(&aux, sizeof(double), 3, arq);
  14. fclose(arq);
  15. }
Add Comment
Please, Sign In to add comment