@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info


Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11



Comments:

<vawjrwrk> have you searched on google?
<MrMuscolo> not necessarily XML, but i need to store hierarchicle data
<vawjrwrk> have you looked at the serialize stuff from boost?
<exception> boost can unserialize xml, but only a certain form of it
<MrMuscolo> not really.. I thought you guys could give alink, so i don't have to search that much
<exception> but it's not C either
<MrMuscolo> i need c++
<MrMuscolo> not c
<exception> then google for xerces
<MrMuscolo> yep, found it, thanx
<MrMuscolo> hmmm, this is huge... 10MB... isn't there something smaller?
<vawjrwrk> exception yes, but if he's writing it, one presumes it can read it
<vawjrwrk> what is huge?
<MrMuscolo> 10 MegaBytes
<vawjrwrk> what is 10megabytes?
<MrMuscolo> ohh :))
<|Serpent_> what exactly is it that takes 10megs?
<MrMuscolo> the xerces
<vawjrwrk> btw, boost is at www.boost.org
<melfar> well that's really huge though :]
<MrMuscolo> xerces is 10 MB
<melfar> MrMuscolo, expat is around 10K, but you probably wouldn't be satisfied with the way it works :]
<|Serpent_> damn i'm looping the same track for the last 24 hours, something in those angry german vocals makes me want to listen more :D
<vawjrwrk> it's the subliminal *** that's got you listening
<|Serpent_> maybe
<MrMuscolo> melfar: I'm don't need anything complex, I'll take a look, 10x
<melfar> subliminal angry german *** :]
<clsk> Doesn't sound too good
<Noidea> http://www.uta.fi/FAST/US8/PC/spade.html
<Tamama> it has a perfect operator match
<Tamama> but thinks another one is a near-match and so doesnt compile -.-
<rdragon> what are the signatures?
<MrMuscolo> melfar: hmm... i guess you were right
<melfar> about the self-describing name SAX ?
<Tamama> rdragon: the operator is wstring::operator =(const wstring &) and wstring::operator =(charT)
<Tamama> and it likes charT better somehow
<rdragon> what's charT ?
<Tamama> wchar_t
<_m_> What do you p***?
<Tamama> which is int/32 bits on this system
<rdragon> what did you p***?
<_m_> wchar_t should not be int.
<Tamama> its an object with an operator int () and an operator wstring &() -.-
<_m_> If it is then your system is seriously broken.
<Tamama> its gcc-3.4.4 -.-
<rdragon> meh
<rdragon> what is that object?
<Tamama> it doesnt discriminate between wchar_t and int
<_m_> I bet operator() is const while operator wstring&() is non-const.
<_m_> Tamama: In C++ wchar_t is very != int.
<Tamama> _m_ i know, please let the compiler know too
<_m_> On which OS is that?
<Tamama> it compiles fine under vc7
<rdragon> Tamama maybe you should ditch the operator wstring and just provide an operator<< to a wostream ?
<Tamama> but now i want to compile the thing on freebsd :)
<Tamama> rdragon: and then that wostream has to be a string again?
<_m_> hmm, iirc, freebsd still has some wchar_t insanity.
<YUY0x7> can you post code?
<rdragon> well i'm really not sure how you're using it
<rdragon> what IS the object?
<rdragon> and why is a conversion to both an int or a string acceptable
<Tamama> some_wstring=multi_operator_object
<rdragon> what IS the object?
<Tamama> some multi-type thing
<Tamama> ***ign it an int, it becomes an int
<rdragon> what *IS* it?? what does it represent??
<Tamama> just a univar object.. that is all it represents
<rdragon> like boost::any ?
<_m_> Tamama: people on efnet/#c++ told me that wchar_t is not a typedef on your system.
<Tamama> dunno, could be
<Tamama> _m_ well buggers!
<rdragon> did you write it?
<_m_> So it (correctly) is a type of its own.
<Tamama> rdragon: sure, and i can get past this as well.. just prefer not to
<Tamama> _m_ double buggers
<_m_> tell me is operator int() const?
<Tamama> i can make it
<_m_> That's not my question.
<Tamama> not currently
<Tamama> the thing is
<Tamama> i removed the entire operator int() for test.. and it still complains
<Tamama> albeit now it only sees 2 matches instead of 3 -.-
<rdragon> maybe you should ditch your cl*** and use boost::any
<rdragon> that is, if you really have a valid reason for using something like that
<rdragon> oh, did we ever see the error message?
<_m_> this code works for me: #include <iostream> #include <string> struct foo { operator int() { return 1; } operator std::wstring &() { return s; } std::wstring s; }; int main() { foo f; std::wcout << f; }
<_m_> (using several compilers)
<rdragon> yeah, lets see the errors then
<Tamama> http://pastebin.com/578831
<_m_> Ah that code fails.
<_m_> /usr/local/gcc-3.4.4/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:426: note: candidates are: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits,#include <iostream> #include <string> struct foo { operator int() { return 1; } operator std::wstring &() { return s; } std::wstring s; }; int main() { foo f; std::wstring s; s = f; }
<Tamama> right
<_m_> huh?
<Tamama> i just copy/pasted yours and added an ***ignment.. fail
<_m_> somehow, the error message was pasted, too. WTF?
<_m_> como doesn't like it, either.
<Tamama> the = operator is just so much more clean in this instance than <<
<Tamama> since it is an ***ignment
<Tamama> std::wstring t(f) works though
<rdragon> well
<rdragon> it might be a nonstandard constructor that takes the wchar_t
<rdragon> er, sorry, you're looking at ***ignment
<rdragon> ah
<rdragon> try .***ign()
<rdragon> according to josuttis, .***ign() doesn't accept a single character
<rdragon> but = does
<budest> hey, I'm learning C++ and am having a problem trying to compile a small program. Can you take a look at the code and see what you think?
<Tamama> sure
<budest> thanks friend....
<budest> http://www.noidea128.org/sourcefiles/15970.html
<rdragon> Tamama probably because it understood the difference between wchar_t and int, or whatever
<Tamama> yeah wchar_t is a short int there
<budest> oops sorry, think I interupted you guys there!
<Tamama> budest: its fine :)
<Tamama> budest: what is the problem?
<budest> ;)
<budest> getting a compile error with the above code
<Tamama> where
<budest> 14 C:\Dev-Cpp\My Projects\globalvariable.cpp `count' undeclared (first use this function)
<budest> here is the compile log....
<budest> http://www.noidea128.org/sourcefiles/15974.html
<|Serpent_> budest, first you initialize a global count, then initialize a local integer with the same name, i dont know but it might be the problem (i'm only learning, i might be completely wrong)
<Tamama> i tested it here.. bad compile as well
<Tamama> the local/global thing shouldnt matter
<budest> it seems to be a problem with the global variable count
<Tamama> it doesnt see it at all
<Tamama> isnt count a predefined name somewhere?
<_m_> it is.
<_m_> Don't use "using namespace std".
<|Serpent_> cpp rewards originality :D
<Tamama> i renamed count to count1 everwhere.. works fine
<|Serpent_> or name your count nCount
<|Serpent_> yeah
<clsk> Here's why.
<_m_> No, just don't use "using namespace std".
<clsk> /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/stl_algo.h:412: error: also declared as 'typename std::iterator_traits<_Iterator>::difference_type std::count(_InputIterator, _InputIterator, const _Tp&)' here
<Tamama> well there you have it
<budest> So what's the problem then?
<Tamama> rename count to something else
<Tamama> heh
<Tamama> in short
<_m_> No, just don't use "using namespace std".
<Tamama> or that
<budest> _m_: tried that and still compile error
<_m_> You will have to fix the identifiers that belong to std, of course.
<_m_> (i.e. use std::cout, not just cout)
<Tamama> http://www.noidea128.org/sourcefiles/15975
<budest> So what is the problem with the code that it doesn't like the global variable count?
<budest> just so I know


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

#MissKitten
#AllNiteCafe
undernet skype key
undernet tweetyf
#php
180db alarm -keyring -keyfob -key fob
#chatzone
#linuxhelp
#MissKitten
jezabel dalnet -singapore -galaxynet



Home  |  disclaimer  |  contact  |  submit quotes