这个功能有什么问题?我哪里弄错了?

Rid*_*ana 2 c++

我有这个函数声明及其定义:

宣言

void laodFromFile(
      string const& fileName,
      Frames& frames,
      ostream&  log =std::clog);
Run Code Online (Sandbox Code Playgroud)

认定中:

void loadFromFile(
        string const&   fileName,
        Frames&         frames,
        ostream&        log =std::clog
        )
    {
        using std::endl;
        using std::ifstream;

        string const    streamDescription   = "text data file " + fileName;

        log << "Opening " << streamDescription << " for reading..." << endl;

        ifstream    stream( fileName.c_str() );
        (!stream.fail())
            || throwX( S() << "Error opening " << streamDescription << "." );

        loadFrom( stream, frames, streamDescription, log );
    }
Run Code Online (Sandbox Code Playgroud)

错误:

Error   1   error LNK2019: unresolved external symbol "void __cdecl soundData::laodFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class soundData::Frames &,class std::basic_ostream<char,struct std::char_traits<char> > &)" (?laodFromFile@soundData@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAVFrames@1@AAV?$basic_ostream@DU?$char_traits@D@std@@@3@@Z) referenced in function "void __cdecl cppMain(int,char const * const * const)" (?cppMain@@YAXHQBQBD@Z) C:\lacture\loading frames\loading frames\main.obj   loading frames
Run Code Online (Sandbox Code Playgroud)

这个功能出了什么问题?任何人都可以指导我...期待一个好的回应谢谢

Rus*_*est 11

这是拼写错误LoadFromFile和LaodFromFile ......

  • 哈哈.在其他人正在观看之前,明显的错误从未显现出来:) (2认同)

Mat*_*Mat 5

你已经到了laodFromFile某个地方,在loadFromFile其他地方.修复你的拼写错误.