Record Detail

Compile Error

/in/blackjack.cpp: In function 'int main(int, char**)':
/in/blackjack.cpp:122:12: error: 'deck' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     shuffle(deck, player);
     ~~~~~~~^~~~~~~~~~~~~~
/in/blackjack.cpp: In function 'int main(int, char**)':
/in/blackjack.cpp:122:12: error: 'deck' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     shuffle(deck, player);
     ~~~~~~~^~~~~~~~~~~~~~
/in/blackjack.cpp:137:18: error: 'hand_player' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         cardHole = deal_four_cards(deck, &cardUp, player, hand_player, hand_dealer);
         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/blackjack.cpp:137:18: error: 'hand_dealer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
/in/blackjack.cpp:137:18: error: 'hand_player' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         cardHole = deal_four_cards(deck, &cardUp, player, hand_player, hand_dealer);
         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/blackjack.cpp:137:18: error: 'hand_dealer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
/in/blackjack.cpp: In function 'int main(int, char**)':
/in/blackjack.cpp:122:12: error: 'deck' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     shuffle(deck, player);
     ~~~~~~~^~~~~~~~~~~~~~
/in/blackjack.cpp:137:18: error: 'hand_player' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         cardHole = deal_four_cards(deck, &cardUp, player, hand_player, hand_dealer);
         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/blackjack.cpp:137:18: error: 'hand_dealer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
/in/blackjack.cpp: In function 'int main(int, char**)':
/in/blackjack.cpp:122:12: error: 'deck' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     shuffle(deck, player);
     ~~~~~~~^~~~~~~~~~~~~~
/in/blackjack.cpp:137:18: error: 'hand_player' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         cardHole = deal_four_cards(deck, &cardUp, player, hand_player, hand_dealer);
         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/blackjack.cpp:137:18: error: 'hand_dealer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1plus: all warnings being treated as errors
cc1plus: all warnings being treated as errors
cc1plus: all warnings being treated as errors
cc1plus: all warnings being treated as errors
/in/compile/Makefile:28: recipe for target 'test2' failed
make: *** [test2] Error 1
make: *** Waiting for unfinished jobs....
/in/compile/Makefile:28: recipe for target 'test1' failed
make: *** [test1] Error 1
/in/compile/Makefile:28: recipe for target 'test3' failed
make: *** [test3] Error 1
/in/compile/Makefile:25: recipe for target 'blackjack' failed
make: *** [blackjack] Error 1

Information

Submit By
Type
Submission
Homework
Project 4
Language
C++
Submit At
2022-11-27 11:40:39
Judged At
2022-11-27 11:40:39
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes