CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    May 2009
    Posts
    2

    Error with function call.

    I'm writing a program for my CS class in which names are to be taken from a text file, put into Lastname, Firstname format, inserted into a list, and sorted. CStrings are to be used.

    The problem I've run into is when trying to call the function GetList on line 41. The compiler (Bloodshed Dev-C++, if this is relevant) generates a lengthy error related to ios_base.h

    I'm attatching the implementation file, header, and main program.

    I'm confused as to why this is happening, but I can't figure it out. If someone could help me, I would greatly appreciate it.


    Here is a copy/paste of the error.

    In copy constructor `std::basic_ios<char, std::char_traits<char> >::basic_ios(const std::basic_ios<char, std::char_traits<char> >&)':
    738 C:\Dev-Cpp\include\c++\3.4.2\bits\ios_base.h `std::ios_base::ios_base(const std::ios_base&)' is private
    40 C:\Documents and Settings\Logar\Desktop\Program 4\Program4.cpp within this context
    40 C:\Documents and Settings\Logar\Desktop\Program 4\Program4.cpp In copy constructor `std::basic_filebuf<char, std::char_traits<char> >::basic_filebuf(const std::basic_filebuf<char, std::char_traits<char> >&)':
    769 C:\Dev-Cpp\include\c++\3.4.2\streambuf `std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char, _Traits = std::char_traits<char>]' is private
    40 C:\Documents and Settings\Logar\Desktop\Program 4\Program4.cpp within this context
    C:\Documents and Settings\Logar\Desktop\Program 4\Program4.cpp In function `int main()':
    40 C:\Documents and Settings\Logar\Desktop\Program 4\Program4.cpp initializing argument 1 of `void GetList(std::ifstream, List&)'
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured