Advertisement
kolychestiy

111

Dec 19th, 2021
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.21 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. #include <cstring>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. const char *nameOfFile = "/home/loins/CLionProjects/untitled/input.txt";
  9. //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  10.  
  11. //int toInt(char *str)
  12. //{
  13. //    int *number = new int;
  14. //    int middle_num;
  15. //    for(int i = 0; i < sizeof(str); i++)
  16. //    {
  17. //        middle_num +=
  18. //    }
  19. //}
  20.  
  21. int main()
  22. {
  23.     FILE *input = fopen(nameOfFile, "rb");
  24.     FILE *input = fopen(nameOfFile, "rb");
  25.     int numberOfMass = 0;
  26.     fread(&numberOfMass, sizeof(int), 1, input);
  27. //    int num;
  28. //    int symbol;
  29. //    char last = ' ';
  30. //    int counter = 0;
  31. //    bool flag = true;
  32. //    while (flag) {
  33. //        symbol = fgetc(input);
  34. //        num = symbol - (int)'0';
  35. //        if ((num < 0 || num > 9) && numberOfMass) {
  36. //            flag = false;
  37. //        } else if (num >= 0 && num <= 9) {
  38. //            numberOfMass = numberOfMass * 10 + num;
  39. //        }
  40. //    }
  41. //    cout << numberOfMass;
  42. //    // int *massive = new int[];
  43.     cout << numberOfMass  << ' ' << sizeof(int);
  44.     char i = '1';
  45.     return 0;
  46. }
  47.  
  48. //My dad is very cool//*bad*/
  49. //, because he is//*the not best*/
  50. //the best human!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement