| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11
Comments:
<0> but the error about 'ostream': 'friend' not permitted on data declarations is still there <1> how many errors do you have? <1> and what is the first one <1> infact, give us the entire list <0> i have 70 something errors <1> o...k <1> and how far down the list is this one? <0> #2 <2> Paragon`: You should show all of the source code, and then we'll know immediately what is wrong. <2> A single line is not enough. <0> ok <2> And you normally only need to give the FIRST error, the rest is nonsense is 99% of the cases. <1> aye, often fixing the first one kills off most of the rest <0> ok <0> well im gunna paste the whole thing now so sec <0> this is the implementation of the cl***
<0> http://www.noidea128.org/sourcefiles/16023.html <0> http://www.noidea128.org/sourcefiles/16024.html <0> that is the declaration <2> I think it never heard of ostream <0> hrm <0> heh <0> #include <ostream> could be a problem huh <0> forgot that <2> You should never put 'using namespace std' in a header, so write std::ostream <2> and include <iostream> yes <0> yah <2> though you might get away with <fwdios> or what was the name <2> #include <iosfwd> <1> i usually use the "using std::ostream;" method as opposed to specifying the namespace everytime <1> or whatever <0> ok <0> that brought me to 36 errors <0> namespace and iostream <1> post the errors <0> duh sorry for that stupidity <2> nnp: You can't put that in a header file, not at the 'root'. Maybe in the cl*** itself. <3> I don't think iosfwd declares all the operator << instances. <2> _m_ : just for std::ostream <2> std::ostream& even <0> well im going to work on them myself for a while <0> thats for the nub slapping <0> actually <0> illegal escape sequence <2> I almost always write the std:: everywhere... it makes code more surveyable <0> on the public member overload of / <0> ? <2> you wrote operator \ dude <4> paragon: I'm here to help you <2> not / <3> Run: many operator<< instances are declared as free functions in <ostream> <2> _m_: so? :) <3> so you need <ostream> for << <0> heh sorry <0> im tired and rushed <0> i have like 15 min to finish this :( <2> He only needs std::ostream to be forward declared to make some function a friend that uses std::ostream& as return type and parameter. <2> That that function is operator<< makes no difference. <3> For the header files, right. I was looking at http://www.noidea128.org/sourcefiles/16024.htm <3> l <2> ok <5> Hello. <2> eeck... .com.br <2> Must be a spammer :) <4> lol <2> Or did that change these days? I firewalled .com.br 5 years ago and never removed it again :) <4> <4> lo. <4> <5> heya <4> <4> are you a spammer? <4> <5> no <4> he says he's not a spammer <5> I am not a spammer. There's some time i use to join this channel <2> Well, this is irc - I was refering to email <5> Man, i'm really from brazil :) <2> I was just kidding (not about /dev/null-ing all mail that I receive from .com.br though) <5> np <0> can friends access private data members?
<2> yes <0> hrm <0> its telling me it cant <0> in my >> overload <0> i'll paste <2> Paragon`: You'll get ambiguity by declaring both, <2> friend rational_number operator+(const rational_number &, const rational_number &); <2> and <2> rational_number operator+(const rational_number &); inside the cl***. <2> I'd go with just the first. <0> http://www.noidea128.org/sourcefiles/16025.html <0> well the ***ignment is to do both <0> then in a client <0> show how each works <2> Paragon`: missing ; <0> crap <0> oh <0> doh <3> istream &operator << <--- what is wrong <0> heh <2> _m_ nothing <0> oops <2> oops <2> should be ostream :) <2> And I'd write: std::istream& operator>> <2> I was just looking at the space abuse. <2> Paragon`: You should put the '&' against the type (see http://www.xs4all.nl/~carlo17/c++/const.qualifier.html for a rationale). <2> That URL is mostly about writing TYPE const& instead of const TYPE& (which isn't done by all C++ guru's) though. <2> All C++ guru's write TYPE& foo; and not TYPE &foo; <2> or, TYPE & foo; as you seem to do. <0> thanks will have to get to that after cl*** <0> gtg <0> thanks for help :) <5> I tried to store the number "123456780001" into all kind of int's (short int,long int,blabla). Not worked. Is there any other type of variable (with exception of std::string) that i can store this number? <6> unsigned long perhaps? <6> depends on the platform too... <5> Windows XP. I stored in std::string , but i want to store in a kind of int <6> did you try unsigned long? <5> i will try again <5> but not worked. <5> it stores a different number <6> long long is available in vc++ (part of C99) <7> "123456780001" as written is not an int..its a string <5> hmm,it explains why i stored it in a std::string <6> huh? you actually tried to store it like, unsigned long i = "123456780001"; ? <5> lemme check. I'm using Dev C++ <3> 123456780001 is of type int, no matter what type you try to store it in. <3> Try 123456780001L for long and 123456780001LL for long long literals. <5> YUY0x7: unsigned long int not worked <7> without the quotes obviously <5> worked with long long int <5> thats strange <6> P-Brasil, i was asking if you were doing that (which is obviously incorrect) <5> i tried long long before and dev c++ not allowed me <5> strange <5> YUY0x7: Okay,sorry. <3> P-Brasil: no, it's not strange. <3> 123456780001 is of type int. <3> if it doesn't fit into an int then it doesn't, no matter of what type the variable is you're trying to ***ign that number to. <3> Use 123456780001UL for an unsigned long literal. <5> <3>: I got it working with a long long int <8> opme <8> sigh <9> got a question guys, i'm tryint to get somethign that searches a weblog for hits. it addes them to an avl tree and if find a dup just increments a counter so no dups have their own nodes. now i think it's doing everything correctly however the text screen will only hold so much data. i mad a no recursive (using a stack) method to transvers tree in order and outfile<< p->info << p->count; now for some reason it will run, but nothing gets <8> avl tree? you did your own?? <9> yes <8> the standard library has such things (well red-black not avl, but....<shrug>) <10> min is a simple avl one, with a modified node to just hold a counter <8> and it has traversal alredy written <8> and tested <10> yes <8> avl is NOT simple <8> and I'm not really up to help debugging one when red-black is almost as good for most things and it's _standard_ <10> the recurisve works, and so does the non. i added the none thinking maybe it didn't want to output to file because of some recursion error like filie open or sumthing
Return to
#c++ or Go to some related
logs:
WHO IS THE BUXOM BOSOM BUDDY OF CAPTAIN KREMMEN ?
#AllNiteCafe #linux port 22 : no root to host i hate hostgator
#linux #squid #chatzone wrt54g 550 permission denied HOGAN'S HEROES: WHAT WAS CPL. LOUIS LEBEAU'S NICKNAME?
|
|