| |
| |
| |
|
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
<rain````> u said i have to do something else :P <Kniht> calc u <CalcMe> u = 'u' is a letter, not a word, if you encounter it in conversation the other party must have been, at one time, a member of the illustrious community known as AOL. Proceed at your own risk. <C--> is it ok to use const_cast? <Kniht> C--: why are you using it? <MachinShi> C--: no. it's just there for ****s & giggles ;) <rain````> we love unusable features. <undone> You guys might want to rid yourselfs of rehash -- it's apparently a logbot. See http://boldt.us/irclogs.ws for details. <rain````> ok now i have a serious question <MachinShi> Unnatura|: we know. we've mostly decided we dont' really care <rain````> i want to include a scripting language in my program <rain````> for ai <upb> http://irclogs.ws/efnet/sql.html / http://irclogs.ws/efnet/c++/31Oct2005/1.html <rain````> i've read about a few <rain````> but what u guys think <rain````> whats a really good scripting language... <rain````> performance wise, and ease of use wise <Kniht> tell rain```` about u <MachinShi> rain````: lua <Vova> hey guys can any one tell me why im getting unresolved external symbol error in this cl***? <binrapt> C++ <Vova> http://rafb.net/paste/results/2HRXRz32.html <upb> u might want to ban those bots that one guy discovered boldt.us/irclogs.ws <Yuhjn> vovo: missing proto in the header? <Vova> for the operator overlod + <Kniht> upb: we already saw him mention it, thanks. <upb> ah <MachinShi> yo Yuhjn . what's up? ) <[eloi]> calc undefined reference <Yuhjn> hi machin <CalcMe> undefined reference = unresolved symbol = You've declared and used a function/object. Now, define it, using the same name, type, arguments, etc. Make sure to build the definition into your program! Note that { extern int foo; struct Bar { static int baz; }; } are declarations, whereas { int foo; int Bar::baz; } are definitions. Also, templates usually need to be *DEFINED* in header files. <Vova> Yuhjn what do u mean? <[eloi]> Yuhjn: "unresolved external symbol" is a link error <Vova> im trying to build this operator overload + <Vova> if i comment it out it works fine <Yuhjn> eloi: yeah i guess missing proto would give you call to undefined function <[eloi]> Yuhjn: righto <[eloi]> Vova: you declared a copy constructor but did not define it <Vova> yea i dont need it... for now <Vova> ..im tyring to get the + to work <Vova> overload <[eloi]> Vova: operator+ returns by value... return-by-value makes a copy <Vova> is that causing the problem? <[eloi]> so, yes <[eloi]> calc triad <CalcMe> triad = Rule of Three: If your cl*** has any one of { copy constructor, copy ***ignment operator, destructor }, odds are high that it should have all three. <[eloi]> that should probably be your first priority <[eloi]> then get operator+ working <Vova> i see <[eloi]> also, this is really a linked-list cl*** with some extra meat... minimally, it probably shouldn't have a "current" member... ideally, it should be two cl***es, one that does linked-list stuff and one that uses that to do polynomial stuff <Kniht> are people still rewriting std::list? <Yuhjn> i sure hope not <[eloi]> and if the ***ignment doesn't specifically require a linked list, an array would be better :) <Yuhjn> last time i wrote a linked list cl*** was college <[eloi]> Kniht: everyone should do it once <[eloi]> ...and never touch it again :) <Kniht> sure, but not while mixing it up with something else <rain````> kniht: its a good learning exercise <Kniht> i agree with doing it once <rain````> aye <MachinShi> Yuhjn: but! but! but! i can write a faster linked list cl***. stl ****s! it's slowz0rs! <[eloi]> Kniht: true enough <Kniht> rain````: it's* <rain````> it's! <rain````> stl is slow. <[eloi]> MachinShi: mine's better because its interface isn't all full of cruft <kaber2> LOL Raphael^^ <kaber2> err. rain```` <rain````> after all, brilliant people made it. <rain````> hahahahaha <rain````> twas a joke. <kaber2> oh <pulse__> what's wrong with stl after all? <[eloi]> http://www.gnomesane.net/code/list/list.hpp?pretty=y <kaber2> not much imho <pulse__> did you ever make benchmarks at all? <rain````> nothing is wrong with stl <rain````> but i think it could be expanded a bit <bobbyz> hmmm...another stupid question. If I want to wait until a user presses enter in a standard C program, I use scanf and compare to "\n" right? <kaber2> i think template is a bit long to type. be tite if it was tmpl <kaber2> lol <[eloi]> apropos2 getline <CalcMe> found: "blank getline" "cat" "getline" "getline2" "getline_items" "getlinebug" "getlines" "ignoreline" "linefeed" "loadstring" "msvc-getline" "readline" "tabs" "tokeniser" "tokeniser2" "vc getline" <[eloi]> apropos2 scanf <pulse__> bobbyz /join #c c <CalcMe> found: "answers" "cio" "fflush" "fflush2" "fsv" <bobbyz> pulse__: thanks... <[eloi]> calc fflush2 <CalcMe> fflush2 = Apparently, in addition to the techniques in `calc fflush`, scanf("%*[^\n]") can ignore all characters up to and including '\n' (i.e. the rest of the line). <rain````> for one, stl needs a few functions for endian-swapping. <rain````> its annoying to have to rewrite those every time i make anything endian-dependant. <[eloi]> er, wait <[eloi]> bobbyz: if you want to read a line, fgets is the way to go <Soronel> rain: c++ isn't really aware of endianness <[eloi]> calc gets <CalcMe> gets = Never use gets. Ever. Use fgets with stdin as its third parameter. gets has no means of determining the size of the buffer you provide, which leaves your code vulnerable to buffer overflows. Just Say No. <kaber2> > http://qxxy.com/users/efnet-cpp/aolban so ridiclious. casue almost everyone's packets are being routed by AOL <Soronel> rain: your system is, and almost certainly provides endian swapping functions <kaber2> cause <james-_> rain: why would you rewite them? And why would standard C++ care? I write lots of code that just works irrespective of endianness, and I work with network protocols all the time. <rain````> well <james-_> C++ works on systems which are neither big- nor little-endian. <rain````> just simple swaps <kaber2> the big 3 are are level3, atdn and aol <james-_> As well as systems that are. <pulse__> lol <pulse__> I know a lot of idiots @ level3 <roopjm> there's always the hton and ntoh functions in the tcp/ip library.. <pulse__> eventhough I dont know that ISP at all <kaber2> work in the colo or hq <rain````> (it was just an example) <pulse__> in france I think my ISP is the idiots one :P <kaber2> verio and above.net have some kick *** facilities though <kaber2> got neat little videos on there website <Symmetry_> I'm just wondering, is there such a thing as free CVS repositories on the net? <james-_> Symmetry: sourceforge. <Soronel> roopjm: win32 even have functions that are able to do network byte ordering while agnostic of the actual network in use <kaber2> cool. both google and yahoo are at above.net <Symmetry_> but you'd have to start a project to use sourceforge, correct? <kaber2> Symmetry_: yes.or you can pay the mother cmopany i think <kaber2> and use the services without having an open source software <Symmetry_> I see, thanks <kaber2> np <Kniht> Symmetry_: you can use local cvs and mirror the files in any webspace you can access <Lonex> char *variable[] is same as char ** variable ? <roopjm> well i hope code is agnostic.. i mean it'd be annoying if your programs stopped working to go to church or bow to mecca or meditate or whatever <Symmetry_> Kniht, could you elaborate "mirror the files"? <Kniht> Symmetry_: with a separate program <roopjm> Lonex: yep <Symmetry_> know of any program like that, kniht? <Kniht> Symmetry_: i'd mount some ftp directory into my local filesystem and use cvs like it was local <Symmetry_> I'm on Windows, if that's relevant <NKD> Religion is good for one thing: getting people killed! <Kniht> Symmetry_: anything you want, i use mounting + xcopy <Kniht> Symmetry_: i use webdrive on windows <Symmetry_> oh I see, that simple <Symmetry_> got it. <Kniht> if you're going to mount it like that, just use cvs as if it was local <Symmetry_> yeah, I just figured it out. <Kniht> i wonder what happens in windows when you go beyond 26 drives <Kniht> i think i've had like 15 at one time before <Soronel> Kniht: I'm pretty sure you can mount to folder now <Symmetry_> I'm 99% sure you can't go beyond Z: <Kniht> yeah, i've done that <Kniht> but some things, like webdrive, don't allow for that <Kniht> i wonder if it has something to do with going through a different subsystem or if it's just not something they offer <Soronel> isn't it amazing how we're still stuck with some of the limitations of cp/m? <Kniht> is that where a: came from? <MachinShi> [eloi]: what kinda things in std::list<> do you think are 'cruft' ? <Soronel> Kniht: afaik, yes <Soronel> Kniht: course, cp/m (and dos 1.0 inherited this) didn't have directories
Return to c++ or Go to some related
logs:
chatzone planc
|
|