先在这里发帖 我正在做大学任务,我需要完成一个模拟合同桥牌游戏开标的程序.我提供了以下包含main函数的文件:
/// File: bridge.cpp
/// Creates a deck of cards, shuffles them and displays them.
#include <iostream>
#include <iomanip>
#include <fstream>
#include "game.h"
const int NUM_DEALS = 4;
using namespace std;
int main(int argc, char *argv[]) {
Game game;
ifstream infile;
bool fromFile = false;
if (argc == 2) {
// open the file and check it exists
infile.open(argv[1]);
if (infile.fail()) {
cerr << "Error: Could not find file" << endl;
return 1;
}
fromFile = true;
}
for …Run Code Online (Sandbox Code Playgroud)