From a7089d248ff6e5d791e5bcfd1924ea6ef1ceb708 Mon Sep 17 00:00:00 2001 From: mpabi Date: Sat, 25 May 2024 16:39:06 +0000 Subject: [PATCH] retire #define, first step :) c++ approach --- cpp/_rvmain.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cpp/_rvmain.cpp b/cpp/_rvmain.cpp index bca60c5..bd83114 100644 --- a/cpp/_rvmain.cpp +++ b/cpp/_rvmain.cpp @@ -11,6 +11,16 @@ void strcpy(char *s, char *t) { while (*s++ = *t++); } + +class GamePlayer { + + private: + + static const int NUM_TURNS = 5; + int scores[NUM_TURNS]; + +} c; + #define ALLOCSIZE 10000 static char allocbuf[ALLOCSIZE]; @@ -105,7 +115,6 @@ char *simple_strtok(char *str, const char *delims) { char buf[1000]; struct model * p = (struct model *) buf; //p[1] - // ////func alg