| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10
Comments:
<0> kinda stupid question <0> if I have a function <0> I do a new inside of it ...I can safely return that cl*** <0> nothing will get deleted inside it ? <0> at the end of the stub <1> not with new no <0> in fact I have one global var. <0> and this need to be setted to the value of the cl*** in the stub <0> anyhow, thank <2> cn28h : Yes, that'd do it. <2> cn28h : Is that possible to do in C++ ? <3> j'aime plus l'ide singe <3> not in straight C++ <3> you need Win API <3> which I can't really tell you about <2> Le singe avait ses avantages... mais fallait le nourrir ;)
<3> heheh <2> C'est legal de parler franais ici ou ? <3> no really, but you can get away with a line here or there ;P <3> s/no/not <2> Heh, that's what I tought <2> *thought <4> http://www.youtube.com/watch?v=0aIasXHYDAk <4> Note the great way the mother****er in the civic casually checks his cell phone before checking on her <5> Maybe he's calling 911? <4> Nope <6> What is a function that can read from the keyboard in win32? <4> Vehicle inspection laws used to bother me until I realized how many people like that are on the roads <4> Rizzo, functions don't read from the keyboard, per se. In windows, the keyboard driver fires a keydown event to windows, which may direct it to your program if you have the keyboard focus or whatever. <6> What header files in dev- <4> Your message loop monitors for events and you can add the keydown (or whatever) message to your handling routine to take action when it receives one <6> I need to check if a key is pressed down <5> Rizzo: Do you knwo about message loops, and trapping messages? <5> Well, trappign and processing. <6> I'm using dev-C++ <5> Well, that's nto the question. <6> The question is what can I use to read keyboard <5> You'll need to process the WM_KEYDOWN message in your WndProc. <5> If you don't know what a WndProc is, go read a tutorial on basic Windows programming. <6> I would rather have it in console mode but win32 doesn't support the functions that I want to use <7> Rizzo : how about scanf ? <7> or cin ? <6> I don't know what header files those are in <7> get a book on c++ programming, and start reading <6> I will try cin <4> Oh <6> If that doesn't work I'll try scanf <4> Haha <7> cin usually works well <6> cin prompts the user to enter a character <6> I need to read from the keyboard <6> without prompting <6> It looks like scanf does this also <4> Those sorts of input routines buffer the input until the user hits enter <6> yes <4> If you wanted to write a game where you press a for up x for down or whatever <6> yes <4> You would have to intercept the messages yourself <4> Which returns to my original response of using the message loop. <4> Here, I'll grab a tutorial link for you quick <4> It's all very interesting, and far more complex than you may want it to be, so bear that in mind. <4> http://www.winprog.org/tutorial/ <4> The specific event you're interested in is PROBABLY http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_keydown.asp <4> But there are a number of events triggered on a key press. <4> At least keydown and keyup <6> both of those are fine <4> Well, you'd only want to intercept one of them, probably <4> But you can google "wm_keydown message loop" or something and you'll get back a zillion returns <4> The hard part is figuring out wtf a message loop is in the first place. <7> http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1045691686&id=1043284392 <7> Rizzo : read it <6> mm that one is good <6> I got the console one to work <6> win32 one doesn't run <5> Rizzo, what are you trying to do exactly? <6> I have a windows version to make a pixel on the screen and I have a way to read the keyboard in console mode
<5> Eh? <6> You see, I need to know how to do both things in the same place <5> Well, you cna't read the keyboard in windowed mode as you can in console mode. It's jsut not the same thing. <6> In one place I have one code and in another have the other <5> ... and? <6> Do I need to repeat myself <6> In Windows, I need to read from the keyboard <6> In Console In need to put a pixel on the screen <8> lol <5> You can't put pixels on teh screen in console mode. <5> Well, maybe with some strange APIs, but that's still counter-intuitive to what people expect from a console. <5> Which is text inout/output <6> I understand there may be a way to set a display mode in console view <6> My cat smells like cagarette smoke <9> uhm, what is the height of a binary tree that has a root and 3 more levels ? <4> :| <4> If you're in a building with a ground floor and three more floors, how many buttons for floors are in the elevator <9> 3 or 4 ? <10> 100,000,000 <4> Heh <9> so it's 4 ? this is important <10> don't know <10> you can probably find out by googling binary tree though <10> man, I don't know what to do. <10> I was planning on going out tonight <4> Should be 4, if by "root" you mean something with a left and right node, then it's 4. <10> so I loaded up on caffeine <10> but, my friends are idiots <10> that might very well be a height of 0 <10> a tree with just a root <4> Shouldn't <9> The height of a node n is the length of the path from the node n to its furthest leaf. <10> well, it's important <10> he should look it up. <9> that's all i could find.. and i don't get it <10> that sounds like 3 to me. <4> Should be the number of levels <4> Hmm, maybe not <4> http://www.cs.bham.ac.uk/~mhe/foundations2/node17.html <9> ohh, so it's something else <11> does it include or exclude the node itself? <11> root* <11> or whatever its called <4> Well, that's the question <11> yeah <4> http://lcm.csa.iisc.ernet.in/dsa/node87.html <12> if the root contains a value, it should be part of the height, otherwise it shouldn't <4> I guess it doesn't <4> Boy, you'd think that, but it's not the impression I get <9> i have root 4, 2nd level: 1 and 9, 3rd level: 6 and 7 from 1, and 8 from 9, 4th: level, 3 and 10 from 6, 11 and 5 from 2 <4> http://oopweb.com/Algorithms/Documents/Sman/Volume/BinarySearchTrees.html <9> damn <4> The height of a tree is the length of the longest path from root to leaf. For this example the tree height is 2. <4> http://oopweb.com/Algorithms/Documents/Sman/Volume/BinarySearchTrees_files/title_data/fig32.gif <12> that's messed up <10> no it's not <12> doesn't anyone study fence points anymore? <10> it makes perfect sense <12> fence posts* <10> then, the height is about log2(n) <10> where n is the number of nodes <10> if the tree is balanced <9> well in my case there are 4 nodes from the furthest node to the root, so i guess the height is 4 <9> including the node and the root <12> log2(7) is 2.8, that's about 3, not 2 <13> nimeni000, what lvl is the height counted from? 0 or 1? <9> threat how should i know ? <10> holy **** I'm forgetting a lot of math. <13> nimeni000, oh, whos question is it? <9> ok, next and last one, how do i figure out if a binary tree is "strict" <9> mine <13> Noidea128++; <13> nimeni000, :/ so you dont know what lvl you are counting from :\' <13> nimeni000, do you know what day it is?
Return to
#c++ or Go to some related
logs:
#php #chatzone header parent iframe php #MissKitten spiral menangitis #chatzone #linux #AllNiteCafe #php cardmgr failed to start gentoo
|
|