| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<_nv> t35t0r, no, but try commenting out individual lines <_nv> and which line is 53? <jamesd-> So it's hunting for a } that's missing, apparently. <_m_> You should use a text editor that supports kissing. <t35t0r> the if is messing it up <t35t0r> if i comment out the if it's ok <t35t0r> wtf??? <_m_> do you have any other comments in your code? Especially stuff that could get interpreted as a digraph or trigraph? <roopjm> trigraph? <t35t0r> i don't know what a digraph or trigraph are <_nv> my kissing editor doesn't see the problem either. <jamesd-> ??< for { <jamesd-> I don't think the problem is with the code we see. <jamesd-> It's with the code we don't. <_m_> roopjm, t35t0r: sequences of 2 or 3 characters that get interpreted as other characters. <roopjm> aha <_m_> (like the so ugly <:: ) <jamesd-> <:: is so sad. <t35t0r> http://rafb.net/paste/results/zlohnH40.html this compiles fine ...this is irritating <_nv> I wonder if msvc has an option to disable digraphs and trigraphs <_m_> that be a good thing. gcc only has an option to *en*able them. Wrong default. <Jey> i prefer the disabled default <_nv> oh, god, I'd rather have them off <jamesd-> The gcc manual used to be quite offensive about trigraphs, saying "you don't want to know about this braindamage". <Jey> if you want -pedantic, use -pedantic <ScottC> my ****ing brother tossed some cable at my ****ing 500 dollar LCD monitor and now theres a tear in it <Jey> send him an invoice <_m_> Jey: does it enable di-/trigraphs? <Jey> _m_: I think so? <t35t0r> uggh this is ridiculous <Jey> only time I got bit by a trigraph was with -ansi -pedantic iirc <jamesd-> I'm surprised if -pedantic enables trigraphs. <_m_> Yeah, that'd be new to me, too. <t35t0r> wth!! i left out the { after the if and it compiled fine !!! <jamesd-> Nope, not for me. echo '??<' | gcc -E -pedantic - <Jey> ah ok <jamesd-> -ansi does enable them though. <jamesd-> So you get half marks. <_m_> t35t0r: any comment with ??> or ??< in it? Any comment line that ends with a \ ? <_m_> or with a ??/ ? <roods> is there anyway to re***ign a reference? <_m_> no <jamesd-> roods: no. If you need reseating, use pointers (or smart pointers). <roods> thanks <Mws> Moin <roopjm> can you do an ***ignment like: string x = char *y; ? <jamesd-> roopjm: that's a syntax error, what's your real question? <jamesd-> roopjm: you can do char array[] = "hello"; std::string x(array); if you like. <roopjm> ah ok.. just wondering if you could ***ign char strings to std::strings <roopjm> figured you could just wanted to make sure <t35t0r> _m_, no ??> or \ or ??< <t35t0r> _m_, removing that { after the if makes no sense at all <t35t0r> _m_, what's more is that i have one method in the cl*** which is not even defined and it still compiles!!! <t35t0r> something every strange is going on <roopjm> its gremlins <jamesd-> t35t0r: missing member function definitions won't cause compilation failures, though it may cause link failures, particularly if they're virtual or they're actually called. <t35t0r> ok explain this one http://rafb.net/paste/results/sYEAzs74.html <t35t0r> ?!?!? <t35t0r> i don't even have that function anywhere in the .h file or defined anywhere else <ZorbaTHut> t35t0r, maybe it's not compiling what you think it is? <t35t0r> uhhh if i put the { after the if in it complains about eof <t35t0r> if i leave it out it compiles <jamesd-> t35t0r: template code may not be throughly checked unless it's instantiated. <t35t0r> hrmm ok <t35t0r> ok i instantiated an object of type quickSort <Jey> but did you call doQuickSort on it? <t35t0r> i'm getting missing ; before '}' <t35t0r> but i see no missing ;'s <t35t0r> and i;m also getting empty controlled statement found; is this the intent? <t35t0r> what does that mean? <t35t0r> the error is "empty controlled statement found; is this the intent?" <_m_> I'm surprised we didn't have calcs for digraph and trigraph. <jamesd-> t35t0r: have you yet pasted the whole source file? <jamesd-> empty controlled statement sounds like a spare ';' at the end of a line. Maybe. Is it a warning, or an error? <t35t0r> there were some comments that i took out and it fixed the problem <t35t0r> very strange <t35t0r> line by line compiling!!! <_nv> t35t0r, what was the exact cause? <Dweep_> Hello <Dweep_> can anyone se the errors? http://home.no.net/dweep87/HELP <ZorbaTHut> = and == are very different things. <Jey> the predicates of your if statements are wrong <Dweep_> can you help me to correct it? <Dweep_> isn't == equal? <_m_> == isn't equal to =. <Dweep_> I know <_m_> That's the problem in your code. <_m_> (well, one of them) <Dweep_> what shall I have <Dweep_> ? <ZorbaTHut> == is comparison <ZorbaTHut> = is ***ignment <ZorbaTHut> which one are you using on the lines with errors? <Dweep_> = <ZorbaTHut> is ***ignment what you want? <NKD> they are in if statements <NKD> the ='s <NKD> He wants to use == instead <ZorbaTHut> nkd, I'm trying to lead him to see that himself. :P <_m_> The error message is trying to tell you that you can't convert the result of the ***ignment to bool. <Dweep_> Ok, understand.. but If i'm using == I get another set of errors.. <NKD> Let me guess, you changed every = to a ==? <NKD> :P <ZorbaTHut> dweep, and this is why you need to *understand* the errors, not just ignore them <NKD> a = 0 // That ***igns the value 0 to n <NKD> a == 0 // that checks if a is zero <NKD> er <NKD> a = 0 ***igns value 0 to a <NKD> not to n ;) <Dweep_> ok <Dweep_> http://home.no.net/dweep87/error is the other errors <Dweep_> I get <_m_> You can't concatenate c-style strings by using operator+. <Dweep_> huh? <ZorbaTHut> you can't add char* strings together like that. :P <_m_> And you can't concatenate strings and int. <Dweep_> ok? <NKD> you are attempting to add an integer "alder" to your string <Dweep_> ok, and thats not legal? I thought that wouldn't be a problem <_m_> Well, it is not legal and that is the problem. <NKD> Nope. You cant put an integer direclty into a string <_m_> There are severals ways out of this problem. <_m_> One way would be to restructure your code so that you don't need the int inside the string. This is fine as long as your code is only about printing. <NKD> Yeah you could simply print the string and the integer seperately <NKD> i.e. std::cout << stringVariable << integerVariable <NKD> But if you need to convert an integer to text, it gets more complex (i dont know how to do that yet myself) <_m_> The other ways all are about converting the int to a string. One method is to use stringstreams for the conversions. stringstreams work similar to cin/cout. However, they write to/read from memory instead of standard output/input. <_m_> calc convert <CalcMe> convert = Using the 'translators' built into the C++ stream libraries (which are extendable), a simple conversion technique is: #include <sstream> std::stringstream tempstream; tempstream << whatever; if ( tempstream >> whateverelse ) // conversion worked!; <NKD> nice <Dweep_> ok, it worked now. <Dweep_> thank you all! <_hhh_> try libc , stdc++ is not for all <ricebowl> "jag.vill.se.dig.naken.net"? <ricebowl> I'm not sure you really do :o <OlaRune> me neither ;) <ricebowl> heh heh <OlaRune> you swedish? <ricebowl> nope. You? <OlaRune> yup <Dweep_> Im norwegian <OlaRune> ok <OlaRune> sweet neighbour in the west <Dweep_> yeah <OlaRune> ^^ <OlaRune> ricebowl: norwegian too? <ricebowl> ah <ricebowl> no, American <OlaRune> :P
Return to c++ or Go to some related
logs:
ursin server irc channel"
practical uses of lipgloss
|
|