Search Results

Showing results 1 to 40 of 173
Search took 0.02 seconds.
Search: Posts Made By: jephthah ; Forum: C++ and child forums
Forum: C++ Jul 15th, 2009
Replies: 5
Code Snippet: Rolling Die!
Views: 933
Posted By jephthah
your random dice aren't random.
Forum: C++ Jul 10th, 2009
Replies: 4
Views: 1,327
Posted By jephthah
A+++++ quality snippet would read this poster again.
Forum: C++ Jul 10th, 2009
Replies: 6
Views: 817
Posted By jephthah
#ifdef is a shorthand form of #if defined. the difference between the two is that '#ifdef' doesnt allow complex expressions.
Forum: C++ Jul 9th, 2009
Replies: 13
Views: 852
Posted By jephthah
he said he wanted the function that returns an angle, "like when you press 2nd then sin on a calculator"

the only functions that *return* angles are the arcsin, arccos, and arctan functions -- the...
Forum: C++ Jul 9th, 2009
Replies: 13
Views: 852
Posted By jephthah
sorry, i made a typing mistake .. in C/C++ the functions are actually called as "asin()", "acos()" and "atan()"

follow the links i provided above and you'll see the prototypes.

the header...
Forum: C++ Jul 9th, 2009
Replies: 13
Views: 852
Posted By jephthah
i belive what you are looking to use are the acos() (http://www.cplusplus.com/reference/clibrary/cmath/acos/), asin() (http://www.cplusplus.com/reference/clibrary/cmath/asin/), and atan()...
Forum: C++ Jul 4th, 2009
Replies: 8
Views: 1,005
Posted By jephthah
if you want to round the number, then you use "setprecision(<n>)" or the format specifier "%.<n>f" for "printf()" where <n> is the number of digits you want to round to. E.g., the value 1.66667...
Forum: C++ Jul 3rd, 2009
Replies: 7
Views: 763
Posted By jephthah
http://tangentsoft.net/wskfaq/examples/basics/select-server.html
Forum: C++ Jul 3rd, 2009
Replies: 9
Views: 383
Posted By jephthah
i find it pretty incredible that a professor would dump all this at once to beginners who had never passed arguments to functions before
Forum: C++ Jun 29th, 2009
Replies: 18
Views: 873
Posted By jephthah
^ i like that link.

i don't think there's an equation without using summation. i tried to think about it for a minute, but gave up. I'm not really a math guy. :D
Forum: C++ Jun 27th, 2009
Replies: 18
Views: 873
Posted By jephthah
it's just LaTeX markup tags. any reference will describe the basics

http://en.wikipedia.org/wiki/Math_markup
Forum: C++ Jun 27th, 2009
Replies: 18
Views: 873
Posted By jephthah
and you don't need a "Big Number Library". you dont even need a long int. 10,000 is easily represented by a regular integer

the way to approach this problem is by summation:
...
Forum: C++ Jun 27th, 2009
Replies: 18
Views: 873
Posted By jephthah
the formula posted by siddhant is fundamentally flawed. it only appeared to work, because it just happened to be valid for n=2 through n=8. as 'n' increases past 8, the result becomes more and...
Forum: C++ Jun 27th, 2009
Replies: 11
Views: 525
Posted By jephthah
that's ridiculous. 14 y.o. is High School, and you are certainly old enough to have homework in a programming class.

furthermore this is a typical standard homework problem.

i'm not saying...
Forum: C++ Jun 26th, 2009
Replies: 5
Views: 282
Posted By jephthah
good lord, that's funny. but i don't think the OP is interested in buying a commercial product to submit as a school project or whatever he's trying to do this for.

a Do-It-Yourself project, i...
Forum: C++ Jun 24th, 2009
Replies: 14
Views: 471
Posted By jephthah
^ what he's saying is that you should *never* use the "equal to" comparison operator for floating point variables.

while his vocabulary wasn't precise about the type of comparison operator, he's...
Forum: C++ Jun 23rd, 2009
Replies: 10
Views: 464
Posted By jephthah
I say that you should avoid the use of old, non-standard libraries like "conio.h" unless you are explicitly instructed -- required -- to do so.

anyone can quickly learn to use any library...
Forum: C++ Jun 22nd, 2009
Replies: 16
Views: 1,079
Posted By jephthah
okay.

I'm calling it now (http://api.ning.com/files/c9uZEV94Dfl02UsMWOeU0mMYYuI3kIIIhJsKF-OM8rIDcZdAxqBg7eZkp47l2ccdOCN*tpI96VyrZW3g9MGVwR8QKg1wT-qR/waahmbulance2.jpg).
Forum: C++ Jun 21st, 2009
Replies: 16
Views: 1,079
Posted By jephthah
ahah

here's the OP, from one of his cross-posts:



:D
Forum: C++ Jun 20th, 2009
Replies: 11
SLR
Views: 467
Posted By jephthah
no, its the way you ask for help

you whine and beg, but you don't ask a specific question. you just post a big slop of mixed up code and demand that someone fix it for you.

well, you need to...
Forum: C++ Jun 20th, 2009
Replies: 11
SLR
Views: 467
Posted By jephthah
no, this is C++. Not C. Which is probably a lot of your problem: you're confusing two related, but different, languages.




how sad.

you're not going to do well around here.
Forum: C++ Jun 19th, 2009
Replies: 16
Views: 1,079
Posted By jephthah
the first one is classic thermodynamics.

im not sure about the second one, but apparently that's what this guy (OP) is doing.
Forum: C++ Jun 19th, 2009
Replies: 16
Views: 1,079
Posted By jephthah
i notice your function is called: "hanming" ...but i imagine you would easily figure out a compile time error such as that.

otherwise, i dont really have fooking clue as to what "calculating...
Forum: C++ Jun 18th, 2009
Replies: 14
Views: 5,651
Posted By jephthah
let's see, here....

this thread is over a year old and is already solved.

so, you post a "solution" that actually does the backassward result of what you claim it does? not to mention a loop...
Forum: C++ Jun 16th, 2009
Replies: 13
Views: 692
Posted By jephthah
okay... you might be right. intuitively the former approach seems logically wrong. however, i must admit that in my one semester of Probability and Statistics, i "intuited" my way to a final...
Forum: C++ Jun 16th, 2009
Replies: 13
Views: 692
Posted By jephthah
of course either way "will work". the point i'm making is that the former method is not a statistically accurate model of the selection process.

if you're trying to investigate lottery...
Forum: C++ Jun 15th, 2009
Replies: 13
Views: 692
Posted By jephthah
think about the typical Lotto game, and how the numbers are selected: you have 40 balls rolling around in a container from which 6 are picked, one at a time, at random.

after each successive...
Forum: C++ Jun 11th, 2009
Replies: 23
Views: 1,185
Posted By jephthah
it's not "jephthah approved". it's "industry acceptable".

i felt my post was quite constructive: I gave several links to a variety of modern and free standard-C compilers without prejudice....
Forum: C++ Jun 11th, 2009
Replies: 16
Solved: Bits in a byte
Views: 746
Posted By jephthah
whether it's currently practical or popular isnt the question. the question was whether C++ defines a byte as being exactly 8 bits. as several of us have learned, it does not. it can be 8 or...
Forum: C++ Jun 11th, 2009
Replies: 16
Solved: Bits in a byte
Views: 746
Posted By jephthah
i, too, believed the same thing Tux did.... thanks Narue for the detailed lesson. i learn a lot here.

.
Forum: C++ Jun 11th, 2009
Replies: 23
Views: 1,185
Posted By jephthah
^ ahaha.. your rep just went from -49 to 0 with one pity post by Dragon. LOL.

now look, here's your chance, adatapost: don't screw it up. think before you post. and get rid of your...
Forum: C++ Jun 10th, 2009
Replies: 4
Views: 512
Posted By jephthah
i read this as "rock paper scissor string" problem.

and thought the problem is, that "string" doesnt fit the "rock paper scissors" paradigm.

:cool:
Forum: C++ Jun 10th, 2009
Replies: 23
Views: 1,185
Posted By jephthah
are you stuck in a time machine? or is it still 1990, where you live?

throw that shit out, and join the 21st Century



Code::Blocks (http://www.codeblocks.org/) (free)
Visual C++ express...
Forum: C++ Jun 5th, 2009
Replies: 2
Views: 257
Posted By jephthah
(1) don't use conio.h

(2) do post your questions in the appropriate forum: this is C++ code, not C
Forum: C++ Jun 5th, 2009
Replies: 5
Views: 497
Posted By jephthah
here, i'll help you get started:

if (month == 4 && day > 20 || month == 5 && day < 21)
strcpy(sign,"taurus");
else if (month == 5 && day > 20 || month == 6 && day < 21)
...
Forum: C++ Jun 4th, 2009
Replies: 5
Views: 497
Posted By jephthah
yeah, about 12 'if / else if" conditional statements.
Forum: C++ Jun 1st, 2009
Replies: 2
Views: 230
Posted By jephthah
sure would be nice if you used syntax highlighting, so it would keep the whitespace/indentations, then i could read the code. otherwise, im not in a position now to compile it so i can't (won't) do...
Forum: C++ Jun 1st, 2009
Replies: 17
Views: 696
Posted By jephthah
Forum: C++ Jun 1st, 2009
Replies: 17
Views: 696
Posted By jephthah
never mind. i'm done here. the correct solution has been given back on page 1.


.
Forum: C++ Jun 1st, 2009
Replies: 17
Views: 696
Posted By jephthah
funny you didnt qualify your "solution" with the "hey i'm a beginner" disclaimer, why are you falling back on it now?

whatever, if you're a beginner, then don't use this site to give wrong advice...
Showing results 1 to 40 of 173

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC