Search Results

Showing results 1 to 40 of 288
Search took 0.03 seconds.
Search: Posts Made By: jephthah
Forum: C Oct 7th, 2009
Replies: 7
Views: 295
Posted By jephthah
you need to post a question if you want an answer.
Forum: C Oct 5th, 2009
Replies: 7
Views: 295
Posted By jephthah
when you 'getch' you're taking the next character off of the input queue for processing.

this assumes once you've processed it, you're done with it, and will (probably) eventually want to get...
Forum: C Aug 5th, 2009
Replies: 13
Solved: Return 0;
Views: 754
Posted By jephthah
the main() program can often be called by a parent program. 'return 0;' indicates to the caller (parent) that the main() program executed correctly.

so... generally speaking, the main function...
Forum: C Jul 16th, 2009
Replies: 18
Views: 679
Posted By jephthah
the error is probably due to the fact that 'x' isn't initialized, so it's value is something like negative eleventy thousand, causing your program to crap the bed when it uses it as one of the array...
Forum: C Jul 16th, 2009
Replies: 18
Views: 679
Posted By jephthah
you got both loops fighting over the same index 'i'
Forum: C Jul 14th, 2009
Replies: 30
Views: 1,621
Posted By jephthah
this thread is a disaster. :)

you are a patient man, Salem.


.
Forum: C Jul 13th, 2009
Replies: 46
Views: 1,514
Posted By jephthah
use code tags correctly. and make sure your code is indented. otherwise, it's a ridiculous mess, and no one will want to look at it.

int main(void)
{
// hello, i am properly formatted...
Forum: C Jul 13th, 2009
Replies: 30
Views: 1,621
Posted By jephthah
Forum: C Jul 13th, 2009
Replies: 30
Views: 1,621
Posted By jephthah
yes, you're right.

even though it works for this trivial example, not casting it properly is a bad habit to get into.

the correct way to initialize it is:

char q[16];
char *p = (char...
Forum: C Jul 13th, 2009
Replies: 30
Views: 1,621
Posted By jephthah
try this:

char q[16];
char *p = &q;
strcpy(q,"abc");

.
Forum: Geeks' Lounge Jul 9th, 2009
Replies: 43
Views: 2,700
Posted By jephthah
this is no more "my" home than yours. do you see a "mod" bubble by my name? no. i don't even have a "featured" bubble, like you and serkan.

i just am blunt, and have little tolerance for...
Forum: Geeks' Lounge Jul 9th, 2009
Replies: 43
Views: 2,700
Posted By jephthah
hardly. because then who would i have to beat up on in geek's lounge?

:P
Forum: Geeks' Lounge Jul 9th, 2009
Replies: 43
Views: 2,700
Posted By jephthah
your post wasnt harsh. it was honest and insightful, and far more gentle than I'll ever be. Mine was harsh. and here's one that's harsher:

The problem is, Serkan is always coming around here...
Forum: Geeks' Lounge Jul 9th, 2009
Replies: 43
Views: 2,700
Posted By jephthah
there are plenty of people with more rep points than me who haven't been featured. and rep points are just as subjective and arbitrary as being selected to get a "featured poster" bubble. i mean,...
Forum: Geeks' Lounge Jul 9th, 2009
Replies: 43
Views: 2,700
Posted By jephthah
jesus shut up already. no one gives a flying shit that your best friends didnt get "featured."
Forum: C Jul 8th, 2009
Replies: 16
Views: 867
Posted By jephthah
this is not your thread to ask basic questions. go open your own thread on how to use IF.

and if you don't know how to use sscanf() -- much less how to look it up (http://lmgtfy.com/?q=sscanf)...
Forum: C Jul 8th, 2009
Replies: 16
Views: 867
Posted By jephthah
what you have written here is an identifier from a #define'd constant -- not a string.

if it were a string, then you could use sscanf() as Tom Gunn suggested. but he's assumed that you really...
Forum: C Jul 8th, 2009
Replies: 3
Views: 629
Posted By jephthah
your .NET installation is broken. Unless you're some sort of windows/.NET guru, the chance of you fixing it correctly is small.

uninstall all visual studio and .NET components, reboot, then...
Forum: Geeks' Lounge Jul 8th, 2009
Replies: 15
Views: 822
Posted By jephthah
$350 a lid?

holy shit, you kids these days.

:icon_rolleyes:
Forum: Geeks' Lounge Jul 7th, 2009
Replies: 15
Views: 822
Posted By jephthah
i made a mistake. i said the OP who suggested that programmers were stoners was from the u.s. midwest... that's not correct. Menster is apparently from Australia.

so let me make my own...
Forum: Geeks' Lounge Jul 7th, 2009
Replies: 15
Views: 822
Posted By jephthah
Yeah, and Hempfest is coming up soon. I wonder if Seattle's former Chief of Police, Norm Stamper, will be there speaking on behalf of marijuana legalization/reform.... again.

:D
Forum: Geeks' Lounge Jul 7th, 2009
Replies: 15
Views: 822
Posted By jephthah
this is a bizarre correlation that you've made, that most programmers are "stoners".

i don't really know many programmers who are "stoners". most of them are intellectual types (or even...
Forum: C Jul 6th, 2009
Replies: 7
Solved: Pointer Problem
Views: 339
Posted By jephthah
'k' is a pointer. meaning it describes, or "points to," an address of memory.

when you first declare this pointer, there is no memory allocated for it and the address that it points to is...
Forum: C Jul 5th, 2009
Replies: 12
Views: 540
Posted By jephthah
that's one way to do it. I prefer to use "strtol()", because you can do more robust error checking to see if the user entered a valid number.

but sure... try "atoi()" to get started.

.
Forum: C Jul 5th, 2009
Replies: 12
Views: 540
Posted By jephthah
fflush(stdin) is totally, utterly, and completely wrong.

never, ever, use it.

learn to parse your input correctly in the first place, and you wont have this problem.

so get rid of scanf()...
Forum: IT Professionals' Lounge Jul 3rd, 2009
Replies: 6
Views: 712
Posted By jephthah
here's an early reply: get your PhD in post-hole digging.

i mean, jesus.

if you need an internet chat forum to tell you what your career research focus will be, you probably should go on...
Forum: C Jul 2nd, 2009
Replies: 9
Solved: file problem
Views: 407
Posted By jephthah
most of these trifling problems will go away when you throw away the P.O.S. Borland/Turbo compiler and get a real C/C++ compiler like CodeBlocks (http://www.codeblocks.org) or Bloodshed Dev C++...
Forum: C Jul 2nd, 2009
Replies: 3
Solved: Using isdigit
Views: 822
Posted By jephthah
the answer to your basic problem:
if isdigit(cResponse);
is incorrect. it should be
if (isdigit(cResponse))
{
// do stuff here
}

(1) an if-statement must be entirely enclosed in...
Forum: C Jul 1st, 2009
Replies: 21
Views: 1,179
Posted By jephthah
or, conversely:

you post your code there, and wait for someone to make it better and hope some guy doesn't expect you to actually learn something, and you can just sit on your ass waiting for...
Forum: C Jun 30th, 2009
Replies: 21
Views: 1,179
Posted By jephthah
i dont know what you did, but your code is not visible.

so, please use code tags.


put your code here
Forum: C++ Jun 29th, 2009
Replies: 18
Views: 868
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: 868
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: 868
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: 868
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: Geeks' Lounge Jun 24th, 2009
Replies: 75
Views: 4,823
Posted By jephthah
^ self-deprecating humor only works if there's a clear distinction between the person and the parody.

in other words: when a creepy internet stalker jokes about being a creepy internet stalker,...
Forum: C Jun 24th, 2009
Replies: 10
Solved: Data Type
Views: 614
Posted By jephthah
EDIT: never mind. find it yourself. (http://lmgtfy.com/?q=mulitple+precision+library)
Forum: C++ Jun 23rd, 2009
Replies: 10
Views: 458
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 21st, 2009
Replies: 4
Views: 459
Posted By jephthah
what salem said.

and, anyhow, if you really want to do this correctly, you will use the standard C library <time.h> (http://www.cplusplus.com/reference/clibrary/ctime/) ... you will make use of...
Forum: C Jun 20th, 2009
Replies: 10
Views: 1,705
Posted By jephthah
oh, hell, i just cut and pasted his code. i didn't even notice that

:)
Forum: C Jun 20th, 2009
Replies: 3
Views: 816
Posted By jephthah
um... you pretty much just described the two steps.

$ gcc file1.c main.c
$ ./a.out

what more do you want to do?
Showing results 1 to 40 of 288

 


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

©2003 - 2009 DaniWeb® LLC