Jun 20, 2004 #1 enqueoshy Programmer Oct 25, 2003 4 MX does C ++ support the ^ operator?? what should I use for this kind of operations? (b^2 * 2*Yc/3)^(1/3) please help?
does C ++ support the ^ operator?? what should I use for this kind of operations? (b^2 * 2*Yc/3)^(1/3) please help?
Jun 20, 2004 #2 Salem Programmer Apr 29, 2003 2,455 GB Well one ^ would have been plenty rather than you falling asleep on the keyboard. ^ means exclusive-or (like & means AND and | means OR) If you're looking for a power operator like some other languages, there isn't one. It exists as a library function. So in your notation, b^2 would be in C++ Code: #include <cmath> double result = std::pow(b,2); -- Upvote 0 Downvote
Well one ^ would have been plenty rather than you falling asleep on the keyboard. ^ means exclusive-or (like & means AND and | means OR) If you're looking for a power operator like some other languages, there isn't one. It exists as a library function. So in your notation, b^2 would be in C++ Code: #include <cmath> double result = std::pow(b,2); --
Jun 21, 2004 #3 globos Programmer Nov 8, 2000 260 FR See also thread : http://www.tek-tips.com/viewthread.cfm?SQID=818938&SPID=116&newpid=116&page=1 -- Globos Upvote 0 Downvote
See also thread : http://www.tek-tips.com/viewthread.cfm?SQID=818938&SPID=116&newpid=116&page=1 -- Globos
Jun 21, 2004 #4 globos Programmer Nov 8, 2000 260 FR Sorry, here's the right URL: http://www.tek-tips.com/gviewthread.cfm/lev2/4/lev3/29/pid/116/qid/818938 -- Globos Upvote 0 Downvote
Sorry, here's the right URL: http://www.tek-tips.com/gviewthread.cfm/lev2/4/lev3/29/pid/116/qid/818938 -- Globos