Record Detail

Compile Error

/in/blackjack.cpp:11:32: error: '::main' must return 'int'
 void main(int argc,char* argv[]){
                                ^
/in/blackjack.cpp: In function 'int main(int, char**)':
/in/blackjack.cpp:16:21: error: invalid conversion from 'char*' to 'int' [-fpermissive]
  int bankroll=argv[1];
               ~~~~~~^
/in/blackjack.cpp:17:12: error: invalid types 'int[int]' for array subscript
  if (argc[3]=="simple"){
            ^
/in/blackjack.cpp:18:3: error: 'Simple_p' was not declared in this scope
   Simple_p player=Simple_p();
   ^~~~~~~~
/in/blackjack.cpp:18:3: note: suggested alternative: 'time_t'
   Simple_p player=Simple_p();
   ^~~~~~~~
   time_t
/in/blackjack.cpp:21:3: error: 'Counting_p' was not declared in this scope
   Counting_p player=Counting_p();
   ^~~~~~~~~~
/in/blackjack.cpp:28:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  for (thishand=1;thishand<argv[2];thishand++){
                                 ^
/in/blackjack.cpp:31:9: error: 'i' was not declared in this scope
    for (i=0;i<7;i++){
         ^
/in/blackjack.cpp:36:11: error: 'player' was not declared in this scope
   int bet=player.bet(bankroll,minimum);
           ^~~~~~
/in/blackjack.cpp:38:17: error: expected initializer before 'Indeck'
   Card player_d Indeck.deal();
                 ^~~~~~
/in/blackjack.cpp:39:36: error: 'player_d' was not declared in this scope
   cout<<"Player dealt "<<SpotNames[player_d.spot]<<" of "<<SuitNames[player_d.suit]<<endl;
                                    ^~~~~~~~
/in/blackjack.cpp:41:31: error: expected initializer before 'Indeck'
                 Card dealer_d Indeck.deal();
                               ^~~~~~
/in/blackjack.cpp:42:36: error: 'dealer_d' was not declared in this scope
   cout<<"Dealer dealt "<<SpotNames[dealer_d.spot]<<" of "<<SuitNames[dealer_d.suit]<<endl;
                                    ^~~~~~~~
/in/blackjack.cpp:42:36: note: suggested alternative: 'daddr_t'
   cout<<"Dealer dealt "<<SpotNames[dealer_d.spot]<<" of "<<SuitNames[dealer_d.suit]<<endl;
                                    ^~~~~~~~
                                    daddr_t
/in/deck.cpp: In constructor 'Deck::Deck()':
/in/deck.cpp:14:19: error: invalid conversion from 'int' to 'Spot' [-fpermissive]
    deck[i+1].spot=i;
                   ^
/in/deck.cpp:15:19: error: invalid conversion from 'int' to 'Suit' [-fpermissive]
    deck[i+1].suit=0;
                   ^
/in/deck.cpp:18:20: error: invalid conversion from 'int' to 'Spot' [-fpermissive]
    deck[i+1].spot=i-13;
                   ~^~~
/in/deck.cpp:19:19: error: invalid conversion from 'int' to 'Suit' [-fpermissive]
    deck[i+1].suit=1;
                   ^
/in/deck.cpp:22:20: error: invalid conversion from 'int' to 'Spot' [-fpermissive]
    deck[i+1].spot=i-26;
                   ~^~~
/in/deck.cpp:23:19: error: invalid conversion from 'int' to 'Suit' [-fpermissive]
    deck[i+1].suit=2;
                   ^
/in/deck.cpp:26:20: error: invalid conversion from 'int' to 'Spot' [-fpermissive]
    deck[i+1].spot=i-39;
                   ~^~~
/in/deck.cpp:27:19: error: invalid conversion from 'int' to 'Suit' [-fpermissive]
    deck[i+1].suit=3;
                   ^
/in/deck.cpp: At global scope:
/in/deck.cpp:34:8: error: expected unqualified-id before 'void'
 Deck:: void reset(){
        ^~~~
/in/deck.cpp:58:8: error: expected unqualified-id before 'void'
 Deck:: void shuffle (int n){
        ^~~~
/in/deck.cpp:111:8: error: 'Card' in 'class Deck' does not name a type
 Deck:: Card deal(){
        ^~~~
/in/deck.cpp:121:8: error: expected unqualified-id before 'int'
 Deck:: int cardsLeft(){
        ^~~
/in/hand.cpp:7:13: error: ISO C++ forbids declaration of 'hand' with no type [-fpermissive]
 Hand:: hand():curValue.count(0),
             ^
/in/hand.cpp:7:13: error: no 'int Hand::hand()' member function declared in class 'Hand'
/in/hand.cpp:12:8: error: expected unqualified-id before 'void'
 Hand:: void discardAll(){
        ^~~~
/in/hand.cpp:17:8: error: expected unqualified-id before 'void'
 Hand:: void addCard (Card c){
        ^~~~
/in/hand.cpp:37:8: error: 'HandValue' in 'class Hand' does not name a type
 Hand:: HandValue handValue() const{
        ^~~~~~~~~
/in/player.cpp:136:2: error: expected '}' at end of input
  }
  ^
/in/player.cpp:136:2: error: expected unqualified-id at end of input
/in/player.cpp:136:2: error: expected '}' at end of input
/in/player.cpp: In member function 'virtual int Simple_p::bet(unsigned int, unsigned int)':
/in/player.cpp:13:21: error: expected primary-expression before ';' token
     throw playerfull;
                     ^
/in/player.cpp: In member function 'virtual bool Simple_p::draw(Card, const Hand&)':
/in/player.cpp:27:21: error: suggest parentheses around comparison in operand of '|' [-Werror=parentheses]
      if (dealer.spot==2|dealer.spot==3|dealer.spot==4){
          ~~~~~~~~~~~^~~
/in/player.cpp:27:51: error: suggest parentheses around comparison in operand of '|' [-Werror=parentheses]
      if (dealer.spot==2|dealer.spot==3|dealer.spot==4){
                                        ~~~~~~~~~~~^~~
/in/player.cpp:51:21: error: suggest parentheses around comparison in operand of '|' [-Werror=parentheses]
      if (dealer.spot==0|dealer.spot==5|dealer.spot==6){
          ~~~~~~~~~~~^~~
/in/player.cpp:51:51: error: suggest parentheses around comparison in operand of '|' [-Werror=parentheses]
      if (dealer.spot==0|dealer.spot==5|dealer.spot==6){
                                        ~~~~~~~~~~~^~~
/in/player.cpp: In member function 'virtual int Simple_p::Counting_p::bet(unsigned int, unsigned int)':
/in/player.cpp:72:20: error: expected primary-expression before ';' token
    throw playerfull;
                    ^
/in/player.cpp: In member function 'virtual bool Simple_p::Counting_p::draw(Card, const Hand&)':
/in/player.cpp:91:20: error: suggest parentheses around comparison in operand of '|' [-Werror=parentheses]
     if (dealer.spot==2|dealer.spot==3|dealer.spot==4){
         ~~~~~~~~~~~^~~
/in/player.cpp:91:50: error: suggest parentheses around comparison in operand of '|' [-Werror=parentheses]
     if (dealer.spot==2|dealer.spot==3|dealer.spot==4){
                                       ~~~~~~~~~~~^~~
/in/player.cpp:115:20: error: suggest parentheses around comparison in operand of '|' [-Werror=parentheses]
     if (dealer.spot==0|dealer.spot==5|dealer.spot==6){
         ~~~~~~~~~~~^~~
/in/player.cpp:115:50: error: suggest parentheses around comparison in operand of '|' [-Werror=parentheses]
     if (dealer.spot==0|dealer.spot==5|dealer.spot==6){
                                       ~~~~~~~~~~~^~~
/in/player.cpp: At global scope:
/in/player.cpp:136:2: error: expected unqualified-id at end of input
  }
  ^
cc1plus: all warnings being treated as errors
/in/compile/Makefile:25: recipe for target 'blackjack' failed
make: *** [blackjack] Error 1

Information

Submit By
Type
Submission
Language
C++
Submit At
2019-11-26 23:54:20
Judged At
2019-11-26 23:54:20
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes