1,265 Posted Topics
Re: [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 … | |
Re: 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. . | |
Re: [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 … | |
Re: [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 … | |
Re: 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 … | |
Re: [QUOTE=jbennet;905773]Ive never seen a water tower before. [/QUOTE] wut? | |
Re: [icode]LOL WUT[/icode] . | |
Re: [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] | |
Re: 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 … | |
Re: [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. … | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: [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 … | |
Re: 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 … | |
Re: [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] | |
Re: 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 … | |
Re: i find it pretty incredible that a professor would dump all this at once to beginners who had never passed arguments to functions before | |
Re: i just recently made the switch from creamy to chunky. sometimes extra chunky. it's like, "where have you been all my life?" | |
Re: 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 … | |
Re: 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 … | |
Re: i dont know what you did, but your code is not visible. so, please use code tags. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: an intellectual is just someone whose education level exceeds their abilities. | |
The End.