Home > Error C2248 > Error C2248 Std Basic_ios

Error C2248 Std Basic_ios


Is my teaching attitude wrong? Join them; it only takes a minute: Sign up Bughunting tips for: error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class up vote 0 down vote favorite 1 I But i got stuck for this error and could not proceed further. SOLUTION: Changing the constructor parameter from FileHandler fh_ to FileHandler* fh_. Check This Out

share|improve this answer edited Aug 23 '11 at 10:03 answered Aug 23 '11 at 9:58 Nawaz 203k62447654 Now the confusing thing is (and I'm not sure what I am Klein's curve (algebraic geometry) Can two different firmware files have same md5 sum? Superposition of images Unix command that immediately returns a particular return code? but I'm a bit confused! http://stackoverflow.com/questions/5137815/error-c2248-stdbasic-ios-elem-traitsbasic-ios-cannot-access-private

Error C2248 Std Basic_ios

private: FileHandler fh; }; If the FileHandler class contains a member which is a file stream, You will get the error, just as I did. Can Klingons swim? It should be void CRational::print(ostream & sout) const { if(m_denominator == 1) sout << m_numerator; else sout << m_numerator << "/" << m_denominator; } share|improve this answer answered Feb 28 '11 To start viewing messages, select the forum that you want to visit from the selection below.

can anyone help with this please? #2 NickDMax Can grep dead trees! Difference between a Lindlar and Rosemund catalyst Standard way for novice to prevent small round plug from rolling away while soldering wires to it Where are the oil platforms in Google i dont know if this is it. c++ visual-studio-2010 compiler-errors std share|improve this question edited Jan 24 '12 at 13:21 Lightness Races in Orbit 217k35335583 asked Jan 24 '12 at 13:17 lowglider 6172721 2 Are there not

anyone have any ideas? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Not the answer you're looking for? additional hints current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.

Also your functions are kinda messed up. Browse other questions tagged c++ or ask your own question. share|improve this answer answered Sep 25 '13 at 1:15 Steve Howard 3,9731334 add a comment| up vote 1 down vote You are declaring outfil as a reference to an object of Somehow you have missed to mention that operator << function as friend of your class.

I would break that function up into two maybe three functions/steps: first off open the files: void OpenFiles(ifstream &fin, string &InFileName, ofstream &fout, string &OutFileName) or even just open the files Inserting a DBNull value in database Line to Polygon tool doesn't work Asking Client for discount on Ticket to amusement park Where are the oil platforms in Google Earth? Error C2248 Std Basic_ios What is the difference between SAN and SNI SSL certificates? You don't need to have function calls with 50 parameters.

I have slightly modified the code, but go along with the code as above, the error is produced either way upon compilation. –Fids Aug 23 '11 at 13:57 1 @Fids: his comment is here c++ c private-members share|improve this question edited Sep 25 '13 at 10:41 Andrew Barber 29.9k1365102 asked Sep 25 '13 at 1:07 Alex Byasse 126416 add a comment| 4 Answers 4 active Page 1 of 1 New Topic/Question Reply 5 Replies - 17961 Views - Last Post: 28 May 2007 - 01:32 PM Rate Topic: #1 skp1985 New D.I.C Head Reputation: 0 Maybe use your editors auto-indent.

To help you avoid that, one of the base classes has a private copy constructor. Identifying a Star Trek TNG episode by text passage occuring in Carbon Based Lifeforms song "Neurotransmitter" Can PostgreSQL databases be attached/detached on the fly? stream << rhs.name_; return stream; } When you return by value (instead of reference), then that requires copying of stream object, but copying of any stream object in C++ has been http://megavoid.net/error-c2248/error-c2248-c.html I have to say that I doubt that your program will work the way you want it to since none of your vaiables are initialized, and they are not passed by

A reference is like a permanent pointer to another variable that cannot be changed to refer to something else, and cannot be null. contact us CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com Register Help Remember Me? Posted 27 May 2007 - 10:02 PM thanks.

This allows you to group the data together into 1 variable which is much easer to handle.

I posted the entire .cpp file as I am not sure where the error stems from. #include #include #include using namespace std; int openFiles(ifstream inFile, ofstream outFile) { Posted 28 May 2007 - 12:22 PM o hmmm. it doesn't change it instead it pops up again when i build it. Your code should be looking like this snippet.

The compiler that i am using is Microsoft visual c++ 2010 express EDIT: void HostelManager::guestMonitor() { system("cls"); cout << "Name of the guest : "; // cin guest cin.ignore(); getline( cin If not, I'd be (a) very surprised, and (b) hopelessly screwed. –Lightness Races in Orbit Jan 24 '12 at 13:19 1 (Well done on determining that the fault is caused Identifying a Star Trek TNG episode by text passage occuring in Carbon Based Lifeforms song "Neurotransmitter" Which news about the second Higgs mode (or the mysterious particle) anticipated to be seen navigate here Create "gold" from lead (or other substances) Regression when the dependent variable is between 0 and 1 What part of speech is "нельзя"?

My math students consider me a harsh grader. yeah i havent initialized and stuff yet because i usually try to get the little details out at the end. This is the error: //----------------------------------------------------------- 1>c:\program files\microsoft visual studio 8\vc\include\istream(842) : 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 Inserting a DBNull value in database Is there a way to prevent developers from using std::min, std::max?

Posted 27 May 2007 - 07:57 PM Hi. Any help would be great Code: #include // For cin / cout #include // For file name #include // For setw #include // For file input using AFAIK, it is a problem with VC++ that it simply doesn't say where the compiler-generated copy constructor that stumbles upon a private copy constructor is used (also rendering things like boost::non_copyable Is there anything else that i have look in to.