Skip to content

Commit

Permalink
Update lab2.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
tolstosup committed Sep 27, 2024
1 parent c18867c commit dbcf9c8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Lab2CPP/lab2.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <iostream>

Check notice on line 1 in Lab2CPP/lab2.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

Run clang-format on Lab2CPP/lab2.cpp

File Lab2CPP/lab2.cpp does not conform to Custom style guidelines. (lines 1, 7, 8, 9, 10, 11, 12, 13, 14, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 100, 101, 105, 106, 107, 108, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122)
#include <string>
#include <fstream>
#include "../LibraryCPP/list.h"
#include "../LibraryCPP/stack.h"
#include "list.h"

Check failure on line 4 in Lab2CPP/lab2.cpp

View workflow job for this annotation

GitHub Actions / cpp-linter

Lab2CPP/lab2.cpp:4:10 [clang-diagnostic-error]

'list.h' file not found
#include "stack.h"

unsigned int priority(const char symbol)
{
Expand Down Expand Up @@ -110,10 +110,15 @@ std::string calculate(std::string expr)
return expr;
}

int main()
int main(int argc, char** argv)
{
std::string data = "";
std::cin >> data;
char* ch = argv[1];
while (*ch != '\0')
{
data += *(ch);
ch++;
}
std::cout << calculate(data);
return 0;
}

0 comments on commit dbcf9c8

Please sign in to comment.