QB64 “C++ Compilation Error”…Help?

Question by : QB64 “C++ Compilation Error”…Help?
I just downloaded QB64. I have a decent knowledge of writing in qbasic-I took a class in it this past semester at my high school. I decided to write a Hangman program that is themed around the TV show Glee (I don’t deny my obsession, I am a total Gleek). Due to laziness and not having a lot of free time right now, I copied a hangman program someone posted from the internet. The only thing I changed was the wordbank. Every time I try to run it I get “C++ Compilation Error” and I can’t figure out why. Here’s my program:

‘Gleekman created by kurts.high.f

DIM SHARED wordlist(200) AS STRING
DIM wordtoguess AS STRING
DIM again AS STRING
DIM letter(26)
DIM numberoftries AS INTEGER
DIM foundletter AS INTEGER
CONST false = 0
CONST TRUE = -1

CALL createwordlist

DO
RANDOMIZE TIMER
wordtoguess = wordlist(INT(RND * 200) + 1)
numberoftries = 0
FOR x = 1 TO 26
letter(X) = 0
NEXT
CLS
LOCATE 1, 30
PRINT “Hangman”
LOCATE 3, 30
PRINT “Find the missing word”
LOCATE 5, 30
FOR x = 1 TO LEN(wordtoguess)
PRINT “-“;
NEXT
LOCATE 15, 30
PRINT “You have 10 chances”
counter = 0
DO
foundletter = False
DO
a$ = INKEY$
LOOP UNTIL a$ <> “”
a$ = UCASE$ (a$ )

SELECT CASE a$
CASE “A” TO “Z”
IF letter(ASC(a$ ) – 64) = 0 THEN
FOR x = 1 TO LEN(wordtoguess)
LOCATE 5, 9 + x
IF UCASE$ (MID$ (wordtoguess, x, 1)) = a$ THEN
PRINT MID$ (wordtoguess, x, 1)
counter = counter + 1
foundletter = True
END IF
NEXT
IF foundletter = false THEN
numberoftries = numberoftries + 1
LOCATE 15, 30
PRINT “You have only”; (10 – numberoftries); “chances ”
END IF
letter(ASC(a$ ) – 64) = -1
END IF
END SELECT

LOOP UNTIL a$ = CHR$ (27) OR counter = LEN(wordtoguess) OR numberoftries = 10
IF counter = LEN(wordtoguess) THEN
LOCATE 8, 30
PRINT “You won”
ELSE
LOCATE 8, 30
PRINT “You lost”
END IF
LOCATE 9, 30
PRINT “Do you want to play again (y/n)”;
DO
again = INKEY$
LOOP UNTIL UCASE$ (again) = “Y” OR UCASE$ (again) = “N”
LOOP UNTIL a$ = CHR$ (27) OR UCASE$ (again) = “N”

SUB createwordlist

wordlist(1) = “RESPECT”
wordlist(2) = “Mr Cellophane”
wordlist(3) = “On MyOwn”
wordlist(4) = “I Kissed A Girl”
wordlist(5) = “Rehab”
wordlist(6) = “Leaving On A Jet Plane”
wordlist(7) = “Goldigger”
wordlist(8) = “PushIt”
wordlist(9) = “Say A Little Prayer”
wordlist(10) = “Take A Bow”

Then I have another 190 words, but you get the idea without me taking up unneeded space. If anyone could help me, because I don’t know what I did wrong, that would be awesomely helpful. Thanks <3Best answer:

Answer by The Phlebob
Well, I don’t think the problem has anything to do with the code. That’s Basic, all right, but I don’t know why a C/C++ compiler seems to be running.

I’d suspect that copy of QB64 ain’t QB64. I hope it’s a real C/C++ compiler and not a Trojan horse.

Hope that helps.

March Rehab Week 4