Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7091597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:12:20+00:00 2026-05-28T08:12:20+00:00

I am converting a large VC++ 6.0 application to VS2010 and keep running into

  • 0

I am converting a large VC++ 6.0 application to VS2010 and keep running into this error for one of the projects:

error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>' 
1>          with  
1>          [  
1>              _Elem=char,  
1>              _Traits=std::char_traits<char>  
1>          ]  
1>          c:\program files (x86)\microsoft visual studio 10.0\vc\include\ios(176) : see declaration of 'std::basic_ios<_Elem,_Traits>::basic_ios'  
1>          with  
1>          [  
1>              _Elem=char,  
1>              _Traits=std::char_traits<char>  
1>          ]  
1>          This diagnostic occurred in the compiler generated function 'std::basic_ofstream<_Elem,_Traits>::basic_ofstream(const std::basic_ofstream<_Elem,_Traits> &)'  
1>          with  
1>          [  
1>              _Elem=char,  
1>              _Traits=std::char_traits<char>  
1>          ]  

Based on the error text and similar questions asked here, I assume that the error is caused by an instance of ofstream passed directly into a functions, instead of being passed by reference.

The problem I have is, to locate the line of code in which the ofstream is passed in the wrong way. The error message only links to the fstream header included in VS2010 and my project uses ofstream all over the place in a code base of several tens of thousand lines of code (none of which written by me).

I would greatly appriciate any help / tips / strategies to locate this type of compiler error. How would you approach the problem of locating this kind of error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:12:21+00:00Added an answer on May 28, 2026 at 8:12 am

    How would you approach the problem of locating this kind of error?

    Do a grep (regex search) in your source files for something like

    \(([^,]+,)*, (std::)?of?stream [^&]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm converting a large, multi-project CVS repository into Subversion using cvs2svn. It's working really
Our system dynamically generates a large report by converting many HTML pages into a
My Grails application has a large number of enums that look like this: public
I'm converting a small PHP application to Django. One section has a long query
I've got several large MFC applications here, and converting them into any other format
I have a large delphi application and I am trying to keep the memory
In PHP I'm converting a large number of blog posts into something more mobile
I'm currently re-developing a fairly large-scale PHP web application. Part of this redevelopment involves
I am converting a large solution from Visual Studio 2008 to Visual Studio 2010.
Is there anything I should know before converting a large C++ program from VS2005

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.