| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12
Comments:
<0> hi <1> Deathmaster working on your long math stuff, eh? <0> if I use: char *filename as a function argument in a C code <2> yup <0> and I am reusing that C code in a C++ program, can I use: <0> const std::string& filename ? <0> or am I forced to use char <0> C code: fparse_n_nnz(ascii_ifile,&n,&nnz); where char *ascii_ifile = "foo.in"; <0> C++ code: const std::string& filename; fparse_n_nnz(filename,&n,&nnz); <0> any comments? <3> corstan get a book already <1> ewwww, why &n and &nnz ? <0> to be read into <0> call by reference <1> ever hear of references? <1> no, that's call by pointer
<0> ok <1> you've learned too much C, and not learned it well <4> mm <3> that's not going to work anyway, especially if fparse_blah is expecting a char* to write into <0> remembering K&R use of that swap function yes <4> vawjr: you p*** by refrence even if its going to be modified? <3> or rather, a char* to read the filename from <1> especially if it's going to be modified <1> const reference if it's not <0> it not going to be modified <0> just a filenae <0> name <3> corstan what is fparse_n_nnz ? <4> vawjr: I'm conflicted on that... part of me doesent like that you can't tell from the call whats p***ed in will be modified <0> parsing an ASCII file to get two number from it <0> integers <3> who wrote it? <0> me <3> what in hell for? <0> ? <0> I told you <3> file >> some_int >> some_other_int; <5> corstan, whenever a parameter that is p***ed by reference will not be modified by the function, you should make it const. <0> yes, but I am trying to reuse my C code <3> what C code? <3> that function? <0> yes, that's from a utils.c and utils.h <0> extern "C" { #include utils.h } <3> well throw the function away, it's useless <3> not sure why you would want to code in C using a C++ compiler <0> rdragon, it works in C, so I don't think so <1> TechRaven correct and I understand your concerns but you can sure as hell tell from the signature of the function you're calling <1> corstan what the hell is utils.h ? <0> rdragon not sure why you would want to code in C using a C++ compiler <-- who said I am going to use gcc to compile *.cpp ? <3> I don't know, I sure didn't <0> vawjrwrk, a collection various file operation function used in the C library <0> parsing ascii and binary files containing numbers from matrices <1> quit using FILE* and use streams <3> corstan the C++ library HAS a bunch of file-related functionality <0> I know that <3> so throw your C crap away and learn C++ <2> LOL "C crap" =)) <3> or just stick to C <0> the point is that I am trying to reuse the C code in a C++ library so that I won't spend the next two months tinkering with this <1> ****s <3> but don't create a dilipidated mish-mash of C and C++ <0> I am not going to be an expert so that's alright <5> No, it's not all right, and that's a lame excuse. <1> why do you think it would take you 2 months to fix it? <1> did you write it that poorly? <3> you're going to spend the next 2 years un-learning C, down that road <5> Doing something correctly has nothing to do with being an expert. <1> apparently NOT to learn C++ <4> if he/she is working off a large code base... maybe it uses the old functions, can't always go rewrite all of that, but if your writing new code, you shouldnt defintly straw away if possible <4> there is an insane C library here, and it almsot forces you to write C style code, I often find myself writing C++ wrappers to deal with the C layer underneath <3> corstan is this work for a job? <1> why are we even talking to a person who hangs out in hackphreak? <0> I did the matrix problem with C <1> corstan #hackphreak +#c #c++
<0> and now I have to rewrite this in C++ <1> then REWRITE it <0> but I have the option of using thin wrappers <0> with minimum C++ code <3> what for? just stay with C <0> but I am of course going to get involved with cl***es <0> so anyways I am getting my hand dirty <3> corstan who is making you do this work? <0> hands <3> is this for a job? <0> rdragon, no! <3> then do it correctly <0> vawjrwrk, @#C++/CLI @#C++ @#vc++ <-- great <3> you've been hanging around here for awhile now, and you haven't seemed to make much progress in learning C++... i suggest you get a book and do it right <0> I did exercises in C++ before <0> then I had to do a project with clean C <3> irrelevant <0> so now I am back to C++ <0> learning as I go <3> you could do that, or you could get a book and actually learn <6> corstan: that #hackphreak you're on, is that related to 2600? <0> it's a channel, and people discuss security issues even though I am not into it <3> heh <0> several of them are good at scripting and coding, so it's a good channel to learn stuff <6> That's not what I asked. <0> python/perl and compiled languages <5> My research has shown that while certain of its denizens may be shady, the channel itself is mostly aboveboard. <0> Run, not sure any of them are related to that magazine or hax0r <7> ok I'll ask then <7> I tried creating one but get an runtime error that points to this function member of WINSPLIT.CPP file: http://www.noidea128.org/sourcefiles/15905.html <6> Ah, wrong answer... the right anser was: "I don't know what 2600 is" :p <7> I tired creating... a cSplitterwnd <0> Run, please enlighten us instead of throwing off a link to Wikipedia <5> http://www.urbandictionary.com/define.php?term=%23hackphreak&defid=609600 <7> brb gotta smoke <5> That's pretty accurate. <7> lol <3> pfloyd34 maybe the row,col is invalid <6> corstan: I'll enlighten you: I wasn't really talking to you, I was thinking about "<1> why are we even talking to a person who hangs out in hackphreak?", and now made up my mind. <3> heh <6> He has the same rating as me... though on ICC he's a lot stronger (in rating points). <7> ok thanks rdragon lemmie try <6> Turn out that (I can see his game history on ICC) he prefers the Trompowsky Attack... <3> I hate how MFC is so intolerant of bad data <6> I suppose nobody here is a Trompowsky Attack guru? <1> Run what's your rating? <6> Not very high, heh. <6> At the moment 1815 <1> that's the old USCF rating <6> but well, I'm rising - I haven't played for a long time and when I started a 1.5 years ago they let me start at 1600 :/ <8> ICC? <8> chess? <6> My TPR is 1850 now though... so, I'll be happy if I can reach 1900 within the next 12 months, and I think that 2000 is my all-time ceiling: my memory isn't good enough and I lack the ability to visualize a chess board (I play completely based on one-ply deep patterns and positional strategy) <1> ah, one of the best comments I ever had about my playing was from a guy with a 2390 rating who said he liked to play me because I scared the hell out of him during play. I always had him in "panic" mode thinking I saw somthing he didn't <6> Some patterns are patterns in which you can give mate in 6 of course, but still: I can't SEE the moves - I just know what the next move is when it's my turn, heheh. <6> heheh <6> With a rating of 1400 that is unlikely :p <6> 300 points difference on this logarithmic scale means you can win 10 out of 10 being drunk, usually. <6> I some times talk to people who have a rating of 2400+ and it is clear I can NEVER reach that: they all remember every game they ever played. If you ask a question, they often put on a position on the board (in the MIDDLE of the game!) with the words - yeah, I had a position like this once in 1984 ... <0> what could this mean: test.cpp:10: error: expected constructor, destructor, or type conversion before '=' token <0> test.cpp:10: error: expected `,' or `;' before '=' token <3> it could mean your code is wrong <0> heh, besides that <3> why won't you just show the bad code? <3> i'm can't enumerate every possible circumstance that error might pop up for <3> besides your code being wrong? compiler bug <9> corstan, perhaps you called operator= outside a function <6> corstan: If you are interested in errors, I can show you an average compile error as I get them usually... <0> yes, outside main() <0> Run, my life is full of errors, so got my own list :) <9> corstan, that's forbidden <3> corstan - post the code, geez
Return to
#c++ or Go to some related
logs:
#php #chatzone how to remove scandisk for win2k3 421 Failed to create data connection socket #linux #php male chatmate #mirc organicchemistry #c
|
|