Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <cstring>
- #include <string>
- using namespace std;
- const char *nameOfFile = "/home/loins/CLionProjects/untitled/input.txt";
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- //int toInt(char *str)
- //{
- // int *number = new int;
- // int middle_num;
- // for(int i = 0; i < sizeof(str); i++)
- // {
- // middle_num +=
- // }
- //}
- int main()
- {
- FILE *input = fopen(nameOfFile, "rb");
- FILE *input = fopen(nameOfFile, "rb");
- int numberOfMass = 0;
- fread(&numberOfMass, sizeof(int), 1, input);
- // int num;
- // int symbol;
- // char last = ' ';
- // int counter = 0;
- // bool flag = true;
- // while (flag) {
- // symbol = fgetc(input);
- // num = symbol - (int)'0';
- // if ((num < 0 || num > 9) && numberOfMass) {
- // flag = false;
- // } else if (num >= 0 && num <= 9) {
- // numberOfMass = numberOfMass * 10 + num;
- // }
- // }
- // cout << numberOfMass;
- // // int *massive = new int[];
- cout << numberOfMass << ' ' << sizeof(int);
- char i = '1';
- return 0;
- }
- //My dad is very cool//*bad*/
- //, because he is//*the not best*/
- //the best human!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement