Posts

Showing posts from December, 2021
#include <iostream> #include <vector> #include <stack> int calculate ( int a , int b , const std :: string & operation ) {     if ( operation == "+" )         return a + b ;     if ( operation == "-" )         return a - b ;     if ( operation == "*" )         return a * b ;     if ( operation == "/" )         return a / b ;     return - 1 ; } bool isOperation ( const std :: string & ope ) {     return ope == "+" || ope == "-" || ope == "*" || ope == "/" ; } int RPN ( std :: vector < std :: string > & notation ) {     std :: stack < int > numbers ;     for ( const auto & str : notation )     {         if ( isOperation ( str ))         {             int n2 ...

error: ld returned 1 exit status

``` error: ld returned 1 exit status ```     If your vs code editor showing you that error after run code than            Check your constructor first if you include constructor in class than you should also initialize them (no args constructor and destructor ) save your code before run keywords: error: ld returned 1 exit status , error: ld returned 1 exit status , collect2.exe: error: ld returned 1 exit status @glax3210