| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8
Comments:
<0> i don't need that precision <1> you expected a 'z' value of '0'... what are you getting? <0> a wrong value from a wrong calulation <1> I don't think I can help you <0> the precision i actually use cannot create a difference of 0.08 using a r of 0.5 <1> wow, so tired <0> if i get the concept right... giving a value of 90 to the x angle (theta) the Z should be 0 whatever the Phi angle (z angle) <2> StaZ[home]: the angle should be in radians, not degrees... <0> yeah i do r * cos(90.0f * (360.f / PI)); thats right? <0> huh no... <0> that's not what i do... <0> omg my head aches <3> 180/PI <3> since 2PI = 360 degrees <4> PI/180 <3> that too
<3> 90/(2pi) <3> erm.. no :P <3> gah its early <4> ;) <3> 90/(180*pi) <3> :P <3> meaningless~~~~ <0> okay you're mixing me up... it's pi/180 or 180/pi ? <4> PI/180 <3> well 360 degrees the same as 2PI radians <4> angle in radians = angle in degrees * PI/180 <4> and what's with the float literals? <0> so there's something wrong... z = 0.5f * cos(90.0f * (3.14159265f / 180.0f)); <- this should return 0 no ? it returns me -2.1855694e-008 <4> that *is* 0 <4> stop using floats <4> and you might get closer ;) <0> O_o <4> you know it all gets promoted anyway <0> ... how can you write this line without using floats? <4> in most places there is no advantage to using float <4> z = .5 * cos(90 * M_PI / 180); <0> cn28h well opengl takes floats and this Z will be used in a gltranslate <4> well then at least use cosf <4> cosf() <4> rather than cos() <4> mind you cosf() is from C99 <4> but the answer is really, you *are* getting 0 <0> i don't get it... i did a lot of sin/cos in 2d planes... and saw a bunch of snippets of code using floats in there and i did.. and never got a single problem why now i get errors? <4> what is the error? <0> you say i am getting 0... why don't i see my variable witha value of 0 ? <4> that the answer is one 200 thousandths of a radian off? <4> that's pretty damn good for a float <0> omg... okay i get it now... <0> stupid me <0> someone kill me plz <4> haha, it happens <2> or, use Mathematica or something ;) <0> i was reading -2.1855694e-008 as being 0.021855694 <4> heheh <4> yeah, that'd do iut <0> ok so that value will do finally <0> lol <4> could be worse, iirc allegro liked to define circles with 256 degrees :) <0> lol <0> thanks for reconforting me :P <5> OpenGL takes doubles too <6> 8 (... why does my program no output a cout<< till after processing has finished? <4> |P|H|P|, it's probably not getting flushed <4> add << endl; <4> bedtime <4> 'night <7> wth... why is the compiler not finding the inherited pure virtual functions from this abstract cl*** in its derived cl***... <7> oh! silly me <8> forgot to actually derive from it? <9> sal lume <8> english. <9> :)) <8> yeah you do that double-chin you fat bastard <7> EwIck: no, forgot to define the functions in the derived cl***' declaration <8> meh.
<10> I am making a win32 project in visual c++. i want to know if i can change the state of a menu item. For example i have a menu item with the id IDM_019, that is checked, how do i uncheck it?(when it is clicked) <8> CheckMenuItem <10> thanks <11> is there a place where I can read about all the commands/functions available in c++, kinda like php.net when you search through all the functions? <12> Hi <12> how to make gcc compile with large file support <13> ref = Some C++ Reference Sources: (1) Your compiler documentation (2) http://www.dinkumware.com/manuals/reader.aspx?lib=cpp (3) http://msdn.microsoft.com/library/en-us/vcstdlib/html/vcoriStandardCLibraryReference.asp?frame=true (4) http://www.sgi.com/tech/stl/ (5) http://www.cppreference.com (*) http://www.google.com <13> d***rull: for the most part, read the docs for the libraries you're using, for the standard libraries the standard is a good reference, but there are plenty of other sources <10> can anyone look over the code i posted at noideea.org?(it's a win32 program). unchecking ID_019, ID_013, ID_016 works but uncheking ID_012 does not work <10> thank you <13> what's the url? <10> www.noidea128.org, my name is BUFU <10> it's tha last one posted i think <10> I started the project in visual c++ 6, then continued it in vsc++ 2005. The first time i compiled it, after adding the check/uncheck code, i got an error that ID_012 does not exist <10> i modified the resource, added the id to the coresponding menu item <10> but now the code does not work <10> for ID_012 <11> Kniht :: Thank you! <10> http://img207.imageshack.us/my.php?image=id0126wi.jpg as you can see in this link the id is put correctly <10> i've put on the site even the resource.h file. <10> could it be from the fact that the last menu id was made in vs2005, and all the other ones in vc6? <14> hi <14> nick /melissa18 <14> aaahhhhh!!! <10> =)))))))) <10> :)) <11> I'm modifying the searchapp htdig. It's String.cc file does not have find, rfind, find_first_of and so on. How can I implement i.e: strrstr, find, rfind into this stringcl***? <11> I am very new to c++ btw... <15> Why would you want to add that to the cl***? <15> And why does htdig imlement its own string cl*** at all? <11> because I need it to find and output text after the last occurence of a word I am searching for, but it only has strstr, so I can only output text from the first occurence of text I am searching for <11> and I do not know why they have their own minimal string cl***... <15> Does htdig's string cl*** offer iterators? <11> Not 100% sure what iterators are, but I think so yes. It can iterate over a string and output the text, I'm not quite sure what it does.. <15> If you have iterators then you can use std::find and std::search on them. <16> how is FlatStyle implemented in .NET ? ie I want to inherit from (User)Control and added a Borderstyle (using CreateParams) and it draws a sunken 3D border, not an XP border like a TextBox/ListView has when FlatStyle is set to Standard <16> anyone ? <11> will try.. <15> frankly, htdig's string cl*** is a good example for a bad string implementation. <11> 'cl*** String' has no member named 'find' .. So, is there any way I can take find from someone else's String cl*** and implement it into this one. <15> It not only does not integrate well with the standard library, it also contains a large number of mechanical errors. <11> mkay <11> but still, its a great searchengine... until I had to start messing with the source <15> really, that string cl*** is remarkably bad written. I'd fire a person who would suggest such code. <15> And, no, it doesn't offer iterators. <11> hehe, thats why its a LGPL app <15> figures. <15> more than 90% of all *GPLed code is crap. <17> hello <11> Which is understandable. If you don't get payed for making it, just make it so it just barely works. <15> you could add .begin() and .end() member functions that return char * instances. Those character pointers are iterators. I.e. you can use the standard algorithm, esp. std::find and std::search on them. <17> whats the difference between " x01\x00\ " and " 0x01, 0x00, " ? <15> d***rull: I disagree. If you volunteer for an open source prohect then you don't have any reason to write crappy code. <10> why does CreateWindow("NAme1", "text2",...) generates an error because of the first 2 parameters? <11> Personally, I would put effort into it, but I can understand those who don't aswell <11> thanks for the tip, I will try it out <10> it works in vs6 like that, but in vs2005? it says that the parameter is wrong type <15> You can also add functions .rbegin() and .rend() that return instances of std::reverse_iterator<char*>. Using those together with std::find and std::search will enable you to perform backward searches. <15> (you'll need to check out the iterators section of your C++ book and the algorithms section, too, I guess) <11> thank you, feel free to keep throwing tips at me.. <18> any of you guys running sql server 2005, can you tell me what accounts are needed to run it? i installed the domain controller software on the same machine and thing it deleted the sql accounts... <15> How is that related to C++? <10> how do i convert an integer to string? for TextOut? <19> std::stringstream is your best bet <15> calc convert <13> convert = Using the 'translators' built into the C++ stream libraries (which are extendable), a simple conversion technique is: #include <sstream> std::stringstream tempstream; tempstream << whatever; if ( tempstream >> whateverelse ) // conversion worked!; <20> why are arrays p***ed to functions by reference? is it because at those times when C was invented, people thought "oh arrays are so huge, nobody will ever want to p*** them by value"? <21> holy **** <22> no, melissa18 <21> a question from a nick of <girl><number> <21> that's a record! <22> heh
Return to
#c++ or Go to some related
logs:
XOR rocks
#chatzone prozacpimp
#java #mirc sexy genmask som3boy #AllNiteCafe #chatzone #linuxhelp
|
|