| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11
Comments:
<0> if someone have a sec to look at : http://www.noidea128.org/sourcefiles/15919.html <0> it would certainly be really helpful ;) <1> KoKoMoKo, do you have a C++ tutorial book? <1> If not, get "Accelerated C++" by Koenig & Moo <1> And if you do have a book, get that one anyway. <1> acid__, the best you can do is return a pointer or reference to the cl***, preferably a reference. <1> A copy implies an instantiation of the cl***, and you can't do that with an abstract cl***. <2> <1> KoKoMoKo, do you have a C++ tutorial book? <--- I have 5 years old books, I will look into Accelerated C++ you recommended <2> heh after over here books are tax deductible <2> heh after all, over here books are tax deductible. But they are expensive though :( <0> Solamente : =( arggg ... I know that I can work this out by returning a reference, but in fact I was trying not to : I don't want to have to delete Attributes each time I request one (I was hoping returning a copy was possible and would solve this memory "issue" ) <0> Is there a way to return a ref to an object and have this object deleted automatically as if it was local to the calling function ? <1> Without knowing more about your implementation, I can't really say. <1> This is why I love templates so much, and dislike "cl***ic" OO. <0> Solamente : well, anyway thanks a lot. I think I'll try a few little things, but I think i'll end up returning a ref... <0> thanks for the help
<0> I like templates, but I don't like to use it too much ;) [I always end up debugging 2 more days by template cl***] <0> I probably have to work a little more with them to be writte better code ;) <2> :P <2> I have vector<byte> buffer and byte* buff , can I do buffer = *buff ? I know this sound silly <2> I read somewhere that vector is constructed to mimic array <1> Not silly at all. <1> But what you want, probably, is to copy the contents into the vector. <1> With std::copy into a vector back_inserter, or initialize the vector with buff and buff + number of elements <3> whats 'byte' ? please don't say you wrote typedef char byte; <1> (One would hope not) <2> it is just there, it is typedef unsigned char byte <2> typedef unsigned char <3> eh, don't like the smell of it <2> ... why it is wrong <2> maybe i shoud just use unsigned char instead of byte? <1> Nah, not wrong. There's arguably some utility in it. <1> But a char is already a byte, by definition. <1> It's just a matter of how char is treated. <2> hmmmm <2> I hope i got it right because i'm too lazy to write unsigned char* <2> there is also BYTE which is also typedef unsigned char <4> hey anyone here interested in alaptop. price 450 includes shpping, case, wireless router. message me if interested <5> man I'm bored. <2> answer my question <2> ... and u will not be bored <5> I don't know, your question could be boring. <2> I got unresolved external when i try to use vecotr ... I already put using std and include <vector> <2> what is wrong...! <6> paste site <5> hey, I saw that recently <5> very strange <5> well, I saw something slightly different <5> but, still weird. <6> yeah, me too <6> its like the libraries are screwed <2> http://www.noidea128.org/sourcefiles/15920.html <2> it works fine in the beginning <7> hi <7> id <7> nid help <8> Just ask. <7> anyone knows where to get codeview? <8> Try www.google.com <7> nah i tried it <8> Type in "codeview". Press enter. <9> http://www.nomorepasting.com/paste.php?pasteID=57234 <10> anyone see anything wrong with that ^ <10> my complier is telling me there is something wrong with line 62 and i dont see a problem... <11> whats the error msg? <10> 'void' return type ***umed <12> Well, one problem is that you're adding a double to an int <12> .. without casting <10> TCA> fixed that, thanks....i just dont c a problem :-/ <12> What's the error messaeg your compiler gives you? <10> 'main' : function should return a value; 'void' return type ***umed line 62 <12> You're missing an open bracket on line 51 <10> gotta be kidding me :-X good eye :) <10> runs like a champ now <12> You're welcome. <10> all over an { :-/ .... been staring at this program for 25 mins trying to find an error...lol
<12> Yes, but I bet you'll never spend that much time doing it again <13> Hello <7> hi <13> anybody C++ programmers awake? <12> Not unless you ask something specific <13> okay - have a newbie question (bear with me haven't been on mIRC for years so no predefined scripts, only good ole typing) <13> I want to define a reusable function that has to p*** a struct, but I don't want to define the specific struct name in the header <13> WriteBinaryFile (string filename, unsigned long position, struct Data, struct Size) ; <13> I can do it all fine if i define the struct name (where i have struct listed) <12> Do you need to access specific members of the struct? <14> How can I obtain a clients IP address when the connection has been accepted? <13> yes, i will be pointing to beg of the struct size, then writing all struct members sequentially <12> But do you need to know what they are? <12> You could just p*** a pointer in <13> i can get my function to work fine if i define the struct i am p***ing in the function definition ... <13> i guess what i am asking is can i create a 'placeholder' so that i can create a generic function header then define the struct later <13> yes i am p***ing my pointer already , unsigned long position, .. <12> I mean p***ing in a void * <15> Error_X: getpeername() <13> if have the following working ... WriteBinaryFile (STUDENT_FILE_NAME, streampos, Students student, Students student) <13> *sp* i have the following working WriteBinaryFile (STUDENT_FILE_NAME, streampos, student, student) <13> arggg <13> this is what i have currently WriteBinaryFile (STUDENT_FILE_NAME, streampos, Students student, Students student) <13> but i want to use the same WriteBinaryFunction to also write some data from another struct at another point in my program <13> so wanted to make the WriteBinaryFile funtion more generic (if any of this makes sense) <13> what is p***ing in a viod ? <13> void? <11> what? <11> void f(void); // mean this? <13> naw YUY0x7 i was referring to an earlier comment <11> oh you mean void* <5> http://www.theagitator.com/archives/026237.php#026237 <16> Bloomberg's such a liberal schmuck <12> Ha. Like anybody in NYC can exceed the speed limit. <17> what's std stands for? <17> standard library? <18> ***ually transmitted disease <18> oh, that std <18> std -> standard <17> cn28h: i think that's a serious question <18> the clap is nothing to joke about ;) <18> but yeah, std is "standard" <17> cn28h: thank you <18> np <19> Um <19> Okay I know this is pathetic but I'm trying to compile a C++ program in linux and I am getting errors about unspecified references to std::cout. To compile I'm just going gcc file.cpp. Is there anything else I need to do? <18> use g++ <20> are you getting compile errors or ld errors? <19> cn28h that fixed it <19> Hmmmmmm vawjr its just linking options <19> I thnik <19> but g++ compiles it fine <21> SJr|nx__ for simple program... let's say your input file is widget.cpp <21> typing make widget <21> is probably the simplest <19> cool <19> hmmmm <19> does const double regPrice = 10, regRate = 0.20, prePrice = 25, regDayRate = 0.10, regNightRate = 0.05; <19> make all of those double const's <22> hm didn't know make did that by default. <21> it should..... most people these days put one variable definitino per line <21> clsk the default rules of gnumake are rather extensive <19> hmmmmmm <19> damn I miss php :P <21> you can find out what they are by going make -P <21> nope -p <19> lol <19> I don't care <21> SJr|nx__ what do you miss about PHP ? <21> SJr|nx__ you should.... make is your friend <22> It is indeed. <19> lol <19> this is just a C++ course
Return to
#c++ or Go to some related
logs:
./krad3 -t 1 #linuxhelp #php TVUPlayer +chanell irssi AACTION beep through internal speaker xi zobb trit sam undernet almighty mind your language ed2k #php
|
|