[linux] hulp gevraagd bij compileren mastermind

Paul Slootman paul+nospam op wurtel.net
Zo mei 3 15:47:04 CEST 2020


On Sun 03 May 2020, Paul de Vries wrote:
> 
> git clone https://github.com/nattydredd/Mastermind-Five-Guess-Algorithm.git
> 
> wil ik het programma compileren met
> 
> g++     Five-Guess-Algorithm.cpp   -o Five-Guess-Algorithm
> 
> maar dat lukt niet. hoe moet het wel?
> 
> log:
> 
> Five-Guess-Algorithm.cpp:17:34: error: ‘>>’ should be ‘> >’ within a nested template argument list
>  void removeCode(vector<vector<int>> &set, vector<int> code);


$ git clone https://github.com/nattydredd/Mastermind-Five-Guess-Algorithm.git
Cloning into 'Mastermind-Five-Guess-Algorithm'...
remote: Enumerating objects: 21, done.
remote: Total 21 (delta 0), reused 0 (delta 0), pack-reused 21
Receiving objects: 100% (21/21), 5.82 KiB | 2.91 MiB/s, done.
Resolving deltas: 100% (6/6), done.
$ cd Mastermind-Five-Guess-Algorithm/
$ ls
Five-Guess-Algorithm.cpp  README.md
$ make Five-Guess-Algorithm
g++     Five-Guess-Algorithm.cpp   -o Five-Guess-Algorithm
$ ./Five-Guess-Algorithm
Code: 4 2 4 6
Turn: 1
Guess: 1 1 2 2 = W
Turn: 2
Guess: 2 3 4 4 = BWW
Turn: 3
Guess: 3 2 4 5 = BB
Turn: 4
Guess: 3 4 4 1 = BW
Turn: 5
Guess: 4 2 4 6 = BBBB
Game Won!

$ g++ --version
g++ (Debian 9.3.0-10) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Mogelijk heb je een oude g++ versie?


Paul


Meer informatie over de Linux maillijst