开发者

whats wrong with this function? where did i make mistake? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

I have this function declaration and its defination:

declaration

void laodFromFile(
      string const& fileName,
      Frames& frames,
      ostream&  log =std::clog);

defination:

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

        string const    streamDescription   =开发者_如何学Go "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 );
    }

error:

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

what is wrong with that function? any one can guide me... Expecting a good response thanks


It's a spelling mistake LoadFromFile and LaodFromFile...


You've got laodFromFile somewhere, and loadFromFile somewhere else. Fix your typos.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜