1,265 Posted Topics

Member Avatar for melissa.johns

[QUOTE]I have about a year to finish the program, under a grant to teach non computer literate majors (me) how to program.[/QUOTE] well, you're gonna learn alot. it won't be efficient learning, and you'll probably learn a lot of poor practices, just to "get the job done". and you're probably …

Member Avatar for jephthah
0
99
Member Avatar for GDICommander

yeah, i was going to say about the same thing.... because obviously there must have been more of a change than merely replacing malloc() with calloc(), since the two are functionally identical aside from initializing memory with zeroes. .

Member Avatar for jephthah
0
296
Member Avatar for OffbeatPatriot

[QUOTE]kernel32.lib can't be found. I've found the library in some Microsoft SDK folder and I add that to the library search path but ... something is wrong.[/QUOTE] 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 …

Member Avatar for OffbeatPatriot
0
588
Member Avatar for monkey_king

[QUOTE=BestJewSinceJC;911909]Why would you give me bad reputation[/quote] [I][B]"i dont know but here's google"[/B][/I] may be appropriate in some cases, but Monkey_King posted a decent question, included formatted code, described the output he wanted, and asked why wasnt it working exactly the way he anticipated. And the answer is not so …

Member Avatar for jephthah
0
3K
Member Avatar for MosaicFuneral
Member Avatar for Menster

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 downright "nerds") who aren't especially prone to partying. granted *some* of them can be grouped in what you would classify …

Member Avatar for Menster
0
141
Member Avatar for Ancient Dragon
Member Avatar for jbennet
0
74
Member Avatar for grisos
Member Avatar for Salem

[QUOTE]For those with a below-par grin ...smile-boosting messages will pop up on the computer screen [such as] "lift up your mouth corners",[/QUOTE] umm... yeah. You know what? [url="http://www.weirdasianews.com/wp-content/uploads/2008/06/no-further-description.jpg"] Japan [/url][URL="http://andre.stechert.org/weird_japanese_shit/only_in_japan.jpg"] is kind of [/URL][URL="http://inquisitr.com/extra/wp-content/2008/12/japan2.jpg"] weird.[/URL]

Member Avatar for MosaicFuneral
0
175
Member Avatar for 9868

if you define the function [I]after [/I]it is called by the code -- such as in "main()" -- the compiler needs a prototype to know how to handle the function when it runs across it in the code. otherwise, it has no clue what the function is and whether or …

Member Avatar for jephthah
0
290
Member Avatar for Pavan_

[QUOTE=Pavan_;909756]After adding malloc ,this code compile and execute perfectly ... can u explain it?[/QUOTE] '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 undefined. …

Member Avatar for tux4life
0
239
Member Avatar for Flyin dagger
Member Avatar for macdonpr

I Third the vote for [URL="http://www.codeblocks.org/"]Code::Blocks[/URL] get [URL="http://www.codeblocks.org/downloads/5"]the version "codeblocks-8.02mingw-setup.exe"[/URL], it comes with the MinGW (gcc) compiler, and you cant go wrong. it's an industry standard. I would not recommend that you use a text editor and stand-alone compiler to learn.... that will increase your frustration. i used to program …

Member Avatar for rampurhaat
0
180
Member Avatar for MrNoob

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() while you're at it. that's a bad function to use, and is a source of the problem. use …

Member Avatar for MrNoob
0
150
Member Avatar for Narue
Member Avatar for monkey_king

[QUOTE]Does anyone have an idea if this can be done smarter, better, faster?[/QUOTE] check out: [URL="http://www.cplusplus.com/reference/clibrary/cstring/strtok/"]strtok()[/URL] ... this breaks a string into tokens at each of one or more delimiters. use it to break the string at each '+' or '-' (the delimiters), then check if the first one or …

Member Avatar for Yrth
0
148
Member Avatar for mgoswami

[QUOTE=mgoswami;906911]Hi, I am interested in doing Phd in computer science. Can anyone help me in finding a suitable topic waiting for early reply.[/QUOTE] 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 …

Member Avatar for jephthah
1
197
Member Avatar for mrayoub

mrayoub: %i and %d are equivalent. both of them specify the format for a signed [B][COLOR="Red"]d[/COLOR][/B]ecimal [B][COLOR="Red"]i[/COLOR][/B]nteger, and either are acceptable to use. %u, as you have seen, is for [B][COLOR="Red"]u[/COLOR][/B]nsigned decimal integer however, if you have declared a variable of type [icode]int[/icode] then you should not print it as …

Member Avatar for ajay.krish123
0
166
Member Avatar for azjherben

[QUOTE=azjherben;906995]If you could just tell me how to set a socket to non blocking and explain select() to me I'd be grateful.[/QUOTE] [url]http://tangentsoft.net/wskfaq/examples/basics/select-server.html[/url]

Member Avatar for Nick Evan
0
185
Member Avatar for tyserman5674

the answer to your basic problem: [code=c]if isdigit(cResponse);[/code] is incorrect. it should be [code=c]if (isdigit(cResponse)) { // do stuff here } [/code] (1) an if-statement must be entirely enclosed in parentheses. (2) an if-statement -- if the condition is evaluated as true -- will execute [B]either [/B]one line of code …

Member Avatar for tyserman5674
0
143
Member Avatar for _dragonwolf_

i find it pretty incredible that a professor would dump all this at once to beginners who had never passed arguments to functions before

Member Avatar for jephthah
0
120
Member Avatar for MosaicFuneral

i just recently made the switch from creamy to chunky. sometimes extra chunky. it's like, "where have you been all my life?"

Member Avatar for jephthah
0
391
Member Avatar for Whilliam

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 [URL="http://www.codeblocks.org"]CodeBlocks[/URL] or [URL="http://www.bloodshed.net/dev/devcpp.html"]Bloodshed Dev C++[/URL]. these GCC-based, standard C compilers wont let you use worthless functions like flushall(), obsolete libraries like conio.h, and will complain heartily if …

Member Avatar for csurfer
0
217
Member Avatar for digital-ether

looks like you're on a Linux platform, yes? so you should have the Gnu C Compiler (gcc) available. put the files you want to compile in one directory, and invoke the GCC compiler like so [code]gcc -o <binaryName> <source1.c> <source2.c> <...>[/code] where binaryName is an arbitrary name of the compiled …

Member Avatar for jephthah
0
167
Member Avatar for DoEds
Member Avatar for Tom Gunn
0
354
Member Avatar for kostasxx

some compilers will initialize variables to zero. but there is no requirement in the C "rules" for them to do so. therefore, most compilers will [B]not [/B]initialize variables you declare, and so their contents are undefined until you do so. they will contain whatever bit pattern previously existed at whatever …

Member Avatar for kostasxx
0
91
Member Avatar for amrith92

there's a lot of evidence supporting "near death experiences"... that sort of parallels the concept of ghosts. i dont believe in anything supernatural, personally, but i also don't presume to have definitive answers for things that can't be demonstrated or explained. some people truly believe they have had experiences that …

Member Avatar for jephthah
1
345
Member Avatar for Meldroz

well, that sure was a helluva lot of effort you put into "solving" someone's 5-year-old homework problem. it almost pains me to tell you that it's completely broken and won't compile on any standard C compiler. :( int main(void) { // in the future, code tags would also be nice …

Member Avatar for jephthah
0
328
Member Avatar for xgmx

an intellectual is just someone whose education level exceeds their abilities.

Member Avatar for s_sridhar
-1
417
Member Avatar for ndeniche

The End.