| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11
Comments:
<0> lol <0> GOTO! GOTO! <1> how do you use goto? <2> :| <1> '"'"'"'"'"'"'" <3> Rizzo : you don't <2> while (game_is_running) { handlekeys(); handlestuff(); draw(); } <4> cghjfhj <0> again: jumpfrom end; <your code> end: <0> :P <3> and what's wrong with for statement ? <2> for (game_is_running = true; handlekeys && handlestuff() && draw(); ); <2> There, it's longer to type <1> the for statement ends when the variable reaches it's maximum <2> No it doesn't <2> I forgot one
<2> for (game_is_running = true; game_is_running && handlekeys && handlestuff() && draw(); ); <2> See, even longer <3> Rizzo : for is just a short way to type certain while loops <1> for is limited <3> it doesn't help much in this case, but you can use it anyway if you really want to <2> a; while (b) { X; c; } => for (a; b; c) { X; } <2> What's limited about it? <3> Rizzo: for can be used instead while loop in any case <3> not that it should be used <1> I need a loop <3> write one <2> #define loop for <2> loop(stuff here) <2> See, it's not a for <2> So it must be good <1> like do while <2> You know what <2> You're an idiot <1> I need to know how it is used <2> do { stuff; } while (condition); <3> Ashe` : #define loop(init,cond,next) for(init,cond,next) <1> mmhmm <2> exception: you're stupid too <1> and I need it to loop coninously <2> do { stuff; } while (1); <3> at least not an idio <0> #define loop for (::) <3> ;; <0> loop { /code */ } <0> typo <3> I like while (true), more expressive <0> the : and ; keys are next to eachother .. heh <2> #define ever ;; <2> for(ever) { } <3> only one shift apart <3> good one <0> while true gives a *constand compare* warning <0> exception: no its not shifted <0> this is not an US keyboard :P <3> it's shifted on the 3 layouts I'm using <3> ok <2> US, US for dummies and US for grannies? <0> lol <3> in fact, none of them is US <0> french, french for dummies and french for grannies? <3> and you forgot "US for complete idiots" <2> French is next to each other <0> nah, that would have made 4 layouts <2> exception: that'd be 4, mister math genius <0> Ashe`: i dont know, i dont have a french one <0> :P <0> anyway this one is japanese <2> I just checked my gf's keyboard <5> if x is float; what's the result of: 3.0*x + 10/4 (10/4 is calculated as 2 float numbers or 2 ints?) <2> 2 ints <2> 10.0/4 or 10/4.0 or 10.0/4.0 <2> To make it float <5> thanks, and this: "1.5 + n/m" if n,m are ints evaluates to float, if n/m are double evaluates to double ... but what happens if n/m are big floats (that p*** over the "float range")? <5> any one ? <0> then you have an overflow <0> :P
<5> doesn't it evaluate to double? "1.5 + n/m" n = big float, m = big float <6> What is a "big float"? There's no such type in C++. <6> oh, he's gone, anyway. <2> Dunno, maybe long double <1> Hello? <7> hello <1> Hi <1> I need help with C++ <8> Rizzo just ask <1> When I found out how to put a pixel in a window, I made a program that puts random pixels all over the place. When I move the window off the screen and back on the pixels come back in different places. Is there a way to make them stay without using an array. And aslo is there a function to read a pixel off the screen. Thx <7> what OS? <8> i can't debug imaginary code <7> Ad you probably do need to keep track of pixels you place, yeah <8> you can paste code to the paste site <8> and why is there the constraint of 'without using an array' - does that include any container, or just built in arrays? <1> I didn't want to use an array because I wanted to keep it simple <8> and arrays aren't simple? <1> and I want to make it so you can move one pixel around on the screen using the keyboard <8> which one? <8> i have no idea how you're placing these pixels <8> if you want to 'move' one, you'll need to keep track of where it is <1> with the rand() function <8> rand() doesn't draw pixels to a window <1> http://www.noidea128.org/sourcefiles/15944.html <8> well, alright <8> so you want to generate a random pattern of pixels just once <1> Yes <8> and always display that same pattern <1> ya <8> you can draw them once to an off-screen surface <8> or <8> you can create a container, and store pixel position & color in it, and draw that each frame <8> (then you can have command over a single pixel, to 'move it around' <8> ) <1> sounds good <1> How would I do that? <8> struct Pixel{ ... }; std::vector<Pixel> pixels; ... <1> I don't know how to use struct std and vector <8> then you need to step back and learn C++ first <8> www.rudbek.com/books.html <1> I'm learning as I go <8> you'll never get anywhere that way - pick up a book <1> The only way to learn is by doing <8> hundreds of failures have come through this channel with the same attitude. the few that realize they don't know best how to learn and pick up a book are the few that actually have a chance <8> accelerated C++ has lots of example problems, so you can 'do', AFTER you learn <8> it's good. and it's not that long. and it's pretty cheap. and it'll get you running in no time <1> Thanks for your help <8> mm hmm <1> I think I have a C++ book burried somewhere <8> lots of crappy books out there that'll do you no good but frustrate you <9> Hi folks! <8> hi rohyh <1> isn't there away to make it have something like static memory or something? <10> _m_, EAD <11> threat: yea iknow <10> acid_x, :) <10> acid_x, I want that one <11> heh <12> i can't build this app, i don't know why...paste link: http://www.nomorepasting.com/paste.php?pasteID=57863 Help me plsss!!! <8> you don't know why? <8> I bet you do <8> any error messages? <12> yeap <8> want to share them? <12> . <12> LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main <12> Debug/yspy.exe : fatal error LNK1120: 1 unresolved externals <6> calc msvcmain <8> looks like your project settings are set to build a console app
Return to
#c++ or Go to some related
logs:
What sport was Boris Onishchenko caught cheating at in the Montreal Olympics ?
Fatal error: [] operator not supported for strings in cos.php lacheti #windows #linux #chatzone #MissKitten #london #linuxhelp #linuxhelp
|
|