小编use*_*448的帖子

错误-只能重载其返回类型的函数不能重载。C ++

我正在尝试创建一个图书馆管理系统。我遇到了一些我不理解的错误。我在Mac OS中使用Eclipse。

我的主要代码是:

#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
#include "Library.h" // include header of Library class
#include "Game.h" // include header of Game class
#include "DVD.h" // include header of DVD class
#include "Book.h" // include header of Book class
using namespace std;

void Library::insertGame( char gameName[], char platform[], int c){
    strcpy( collection[numGames].name, gameName);
    strcpy( collection[numGames].platform, platform);
    collection[numGames].copies = c;
    cout << "Game added to collection.\n";
    ++numGames;
}

void Library::deleteGame( char gameName[]){
    int i;
    for( i = …
Run Code Online (Sandbox Code Playgroud)

c++ oop compiler-errors

1
推荐指数
1
解决办法
2814
查看次数

标签 统计

c++ ×1

compiler-errors ×1

oop ×1