| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Comments:
<0> but don't take my word for it, i am only a student lol <0> i still have alot to learn myself <0> well.... come to think of it <0> the call stack would just keep having more copies of the call to the same recursion <0> the compiler would probably implement it as jumping back to the beginning of where the inline function was placed <0> but inline functions aren't really function calls, are they? <0> so they don't affect the call stack... <1> right, so you've got a problem in that you need to make some kind of call or push the return IP onto the stack <1> (plus arguments) <1> so, it would likely not be inlined <2> it is like taking the generated ***embly and shoving it into where the function call is. <0> yep <2> But the compiler is responsible for such things <0> brb, being summoned to make coffee <1> Twister76 - and taking away the function call overhead <2> So it will either fix it, not allow it, or optimize it.
<0> back <0> hey Twister? <0> when i asked you about wxWidgets, i was going to ask a question that you don't really have to know wxWidgets in order to understand <0> in wxWidgets, a static wxApp derived object acts as the main code for your program <0> it has overrided functions such as OnRun and OnExit <0> kinda like MFC <0> except that MFC actually makes an app object <0> wxWidgets doesn't <0> so my question was, is it proper to place some of my primary routines and application variables in the cl*** as static? <0> essencially the whole cl*** is static <0> but it has private and protected members <0> so it can't be redefined as a namespace <0> and because it has to derive from wxApp <2> well, thats a design decision. <0> ah <0> ic <2> I would have to see it to make an educated decision <0> would you like me to post the header? <0> on www.noidea128.org <2> you could have your own stuff in your own cl***es, and derive from their main cl***. <0> yeah that's kinda what it is doing <0> most people who make wxWidgets programs have their variables and primary functionality in the main window <2> I try not to add things to other peoples code because thier code is liable to change. <3> http://rafb.net/paste/results/eWt8Rw72.html in pqueue.cpp when i try and do: Cust *cust = arrival_queue.dequeue(); i get a weird *** memory dump or something. *** glibc detected *** sim: double free or corruption (fasttop): 0x08c264b8 *** dequeue() returns a pointer to a cust object, so im not sure what's goign on o_O <0> but all that my main window does is kinda act like this IRC client <0> it isn't an IRC client, but all that it is meant to do is accept input and print output <0> it is like a special console lol <0> is the post just a one line text control? <0> oh wait lol <0> me stupid nevermind <0> it has been posted Twister76 <0> DSRSC1 is a stream cipher that i wrote <0> it is sort of a modified RC4 <0> all that it does differently is that it rotates the key instead of copying it over and over into the 256byte array <0> brb have to take out trash lol <0> sorrie about that <0> laptop powersaving conventions <0> caused me to standby and lose connection to Undernet <4> ah, great workout <4> the elliptical pwns <2> ya, me too <5> you don't know how to workout you pansy <0> lol <2> ellipticals are too difficult for me to get my heart rate up and not feel like I gonna die <2> the no impact is good though <5> When all government, in little as in great things, shall be drawn to Washington as the Center of all power, it will render powerless the checks provided of one government on another and will become as venal and oppressive as the government from which we separated. Thomas Jefferson <4> pfft climbing fake rocks != workout <5> I climb real rocks too <5> actually <4> sure sure <5> outside <4> not a workout <5> the climbing itself isn't the workout <5> the approach is the workout <5> I carry a 50 pound pack when I go climbing <2> I have not missed a M-F at the gym in 2 months <5> and some of the walks are long, up and down hills <2> maybe longer <5> Politics ought to be the part-time profession of every citizen who would protect the rights and privileges of free people and who would preserve what is good and fruitful in our national heritage. Dwight D. Eisenhower <0> yep <0> the voice of the people cannot be heard if the people have no voice
<0> or if they have voice and choose not to speak <4> or, unfortunately, they do have a voice like JBlitzen, but they're too dumb to shut up <0> lol <2> understanding politics is a full time job, and then you still **** at it <6> how can I get a whole line from a file in C++? I've already declared the ifstream it's called InFile <2> getline <6> but Infile >> varname only gets the first word <0> right <0> but getline gets the whole line <6> well Infile.getline(stringvar) gives me an error <6> perhaps I'm not using the right syntax for the function <0> thus returning characters until you get a newline <4> getline is not a member <4> getline(cin, mystring); <4> (std::) <4> infile, in this case <0> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang98/html/_iostream_istream.3a3a.getline.asp <0> lol <0> chinese :P yay <4> chinese = teh pwn <4> asians know how to cook <0> very true :) <4> chinese, japanese, korean, viet, indian <4> all great <6> okay and how can I trim whitespace from the left and right of a char array ? <0> algorithmically <0> lets see <0> you could definately write functions to do it <1> simple, don't use char arrays <0> lol that's true <0> the string wrapper cl***es are very advanced and do that stuff for you <4> create a copy that copies if non-whitespace? <2> basically, move all the chars that are not white space down to the front, then insert a \0 after the last char <0> well, that would get rid of every space <1> the stream will skip whitespace when reading, anyway <5> In 1950, the average family of four paid 2% of its earnings to federal taxes. Today it pays 24% William R. Mattox, Jr. (sometime before 1996) <0> yep <1> so your string shouldn't have any leading <7> What in the Christ? Why are all my iexplore instances listening on UDP ports? <4> haxx0r3d <7> Yeah, well, unfortunately, I don't manage this system. I'm just responsible for fixing it. <0> for(X=strlen(str)-2;X>=0;X--) { if (str[X]!=' ') str[X+1]='\0'; } <1> ugh <1> don't use that code <2> buffer overflow <0> oh? <0> hmm <2> err no <0> what causes that? <2> I missed the -2 <0> yep <0> to avoid overflow <1> overrun, if the length == 1 <0> true <1> no point in discussing <0> underrun <2> yeah <0> sorrie :( <1> there's no reason to need to do that <1> <@peterhu> std::getline(std::cin, mystring); <0> yep <2> getline doesn't keep leading spaces? <2> or trailing? <2> I thought it did <1> and use a stringstream, or read directly from the stream <0> it does <0> i think it reads until \n <2> thats what I thought. <0> lol my code wasn't perfect... <7> bbl <0> but it is an idea of what he should do lol <1> it would help if we knew what you were reading in <0> that would be useful
Return to
#c++ or Go to some related
logs:
seeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeex #javascript festivalgoldencross
#linux 12WHAT ARE THE RESIDENTS OF THE ISLAND OF LESBOS CALLED? #linux #AllNiteCafe #linux #gentoo #AllNiteCafe
|
|