6,741 Posted Topics
Re: >You're asking for help in a criminal activity. Technically, writing a virus isn't a criminal activity. Deploying a virus is because it violates the privacy of the target systems. It's irrelevant whether the virus is benign or harmful at that point, but the more damage it does, the worse the … | |
Re: >How to Keep an Idiot Busy Provide a general discussions forum... | |
Re: If this is the common interview question then you want two iterators, one skipping ahead by a single node each step, and one skipping two nodes. If the two iterators meet before the end of the list, you've found a loop. If this is not the common interview question, be … | |
Re: What have you tried? Where have you looked for information? It sounds very much like you want us to either do your work for you, or do your thinking for you, both of which we don't do. | |
Re: >what is a trie?.... A search tree that stores common prefixes in internal nodes, and the prefixes have some form of lexographical order. A search is done by matching the prefix nodes until you reach a leaf, which has the complete string. It's a surprisingly powerful data structure. >i need … ![]() | |
Re: >Redefinition of variable "i" Get a smarter compiler. Some older, lamer compilers (*cough* Visual Studio 6 *cough*) don't properly implement the scope rules for a variable defined in the initialization clause of a for loop. | |
Re: I don't know of any books that cover 64-bit x86. Most of them handle only 16-bit DOS, and only a handful cover 32-bit. If you find one, let me know. | |
Re: >Size of int is implementation dependent. But for portability reasons, you can't assume more than -32,767 to +32,767. The standard requires an int to be at least 16 bits. It can be more, but never less, so it's safe to assume 16 bits and non-portable to assume more. | |
Re: Sorry, but you wore out your code. The only way to fix the problem is to print the source out and then type it all back in fresh. This also happens when you let code sit too long and it starts to rot. But seriously, if your code suddenly stops … | |
Re: >Why cant we use virtual constructors in C++? Because a virtual constructor is nonsensical. | |
Re: >yech, that looks sloppy, the indenting looks better in the IDE. The closing tag for code uses a forward slash rather than a backslash. There's an obvious watermark in the post editor window that shows you exactly how to do it, so you really have no excuses. | |
Re: >I merely suggested that it could be a possibility. It's never a possibility until you've exhausted all other options. >So using %lf with printf is undefined behaviour? In C89 it's undefined. In C99 the length modifier is quietly ignored because the committee realized this confusion was a very real problem. … | |
Re: >I know someone who might be able to help you but not for free. Of course they will, that's the point of this forum. >Please PM me if you are interested Please direct your business propositions elsewhere. | |
Re: What do you want us to do? Mail you the book at no cost to you? Go to [url]www.amazon.com[/url] and buy it yourself. Also, don't bump your threads. It's incredibly rude and presumptuous. | |
Re: >arr[i] = arr[i] + arr[9-i] ; >arr[9-i] = arr[i] - arr[9-i] ; >arr[i] = arr[i] - arr[9-i] That's clever and braindead at the same time. Unless of course you didn't discover that solution, in which case it's just braindead. | |
Re: >what's the difference between deep copy and shallow copy or not so deep copy A shallow copy is copying a pointer. A deep copy is copying the data that the pointer points to. A not so deep copy is a reference count. :D | |
Re: We're still not going to do your homework. | |
| |
Re: >I Need Help Yes, yes you do. Of the professional kind that involves latex gloves. ![]() | |
Re: The easiest way to get a random integer within a range is to take the remainder of division by the high value of the range and add by the low value. So to get a random number from 1 to 10: [code] rand() % 10 + 1 [/code] rand() % … | |
Re: Here's an idea: Why not try writing it yourself first, instead of leeching off of other people because you can't be bothered to think? | |
Re: A good reputation comes from quality, not from the celebrities that find their way to the member list. I think that if this guy wants to join, he'll do it of his own accord. If not, inviting him makes us look like we're desparate for big names. | |
Re: >I dont know how to return the quotient and remainder values from the subroutine to the C Program If you provide the code you're using and tell us what assembler and C compiler you're trying to interface, we can do a better job of helping you. | |
Re: Deja vu. How many places did you spam this? | |
Re: [QUOTE]The first three people to complete this program will be entered into the annual contest for Top Coder! The grand prize is the chance to become one of TopCoders independent programmer. This is a special opportunity to get paid for programing projects that you create. Below is the program to … | |
Re: >Alright... first off I hate fgets with a passion How can you hate something you don't completely understand? Don't confuse ignorance of fgets (or C in this case) with any legitimate problems that it has. Just because you don't know how to use something doesn't mean there's anything wrong with … | |
Re: >That would mean the answer would be b. No, the answer is d. There's no question about it since the inner loop you posted relies on N, not the value of the outer loop counter. Now, if you're talking about counter2 being set to counter1 and using it as N, … | |
Re: Assuming some things, the difference is traversing a linked list to a null pointer and returning the index of the top of the stack. | |
Re: Turbo C++ is the standard for schools that don't care enough about their programming classes to teach something modern. These are usually the courses that have qbasic as a prerequisite, and both are a strong indicator that you're at the wrong school. If it's a personal choice, how did you … | |
Re: >but seems like there is a flaw somewhere There is, and it's frustrating how the same incorrect algorithm is given so often by incompetent teachers. Here, read [url=http://www.eternallyconfuzzled.com/tuts/sorting.html#heap]this[/url]. It's in C, but the code is similar enough and the principles all apply for Java. ![]() | |
Re: >dene = malloc (sizeof(struct deneme)); It's best to avoid explicit types wherever you can. In this case, you can take the sizeof *dene to get the same effect as sizeof(struct deneme). >dene->filename = (char*)malloc(200*sizeof(char)); sizeof(char) is guaranteed to be 1, so it's superfluous. It's also a bad idea to cast … | |
Re: If I understand your question, C++ Builder and Visual Studio can coexist on one system. All you need to do is install both, then pick the one you want to use. | |
Re: I have the published book, but to the best of my knowledge, an ebook version will be illegally pirated. As such, I'm closing this thread because we don't promote illegal activities. If you feel I've made a mistake, feel free to contact me in private with your reasons. | |
Re: When I have code that gives me trouble, I break it down into parts. For example, to make sure your sort works, perfect the algorithm using integers instead of strings. Then modify it to use strings. Perfect your binary search algorithm on integers, then modify it to work with strings. … | |
Re: You need to be more realistic. Let me be an employer for a second and I'll show you what will happen: >I have just finished a PhD in Algorihmic Techniques, all written in C++. Algorithmic Techniques, huh? So you're into theory and research? Well, we need someone who can write … | |
![]() | Re: It's best to move slowly unless you have a pressing need to write a complex class right away. What are you trying to do? ![]() |
Re: >this is the homework for C++. If you understand any thing tell me please. I'm leaning heavily toward deleting any thread that just posts a homework problem with no specific question or proof of any attempt at a solution. Is it so difficult to understand that we're not [url]www.rent-a-coder-for-free.com[/url]? | |
Re: strcmp takes C-style strings, not C++ string objects. The string class has overloaded the relational operators, so you can use < and > to compare them. But if you have your heart set on strcmp, you can do this: [code]x = strcmp(word1.c_str(), word2.c_str());[/code] | |
Re: Now, now, children. Don't make me separate you. :rolleyes: ahluka, you haven't earned the right to your attitude, so stuff it or I'll have a field day moderating your posts. If you want us to tolerate some lip, show that you're worth it. And yes, I'm familiar with your performance … | |
Re: Look closely: [code]error C2065: [B]'Code_table' [/B] : undeclared identifier[/code] [code]typedef struct [B]Code_Table[/B] { int oper_and; int instruction_number; string instruction; } [B]Code_Table[/B];[/code] You also don't need to use that typedef trick in C++. The compiler does it for you. | |
Re: Bumping your own thread is a good way to get it locked. It's also incredibly presumptuous and rude, and you're likely to be ignored because of it. | |
Re: You need to decide which graphics library to use, and there are several to choose from. A good start would be [url=http://www.foosyerdoos.fsnet.co.uk/]here[/url]. You can get a feel for the kind of effort that goes into a GUI system compared to console applications. | |
Re: >Can you help me solve this prob? Sure, but we won't do it for you. And when you post program requirements without any proof of an attempt, that's what it seems like you want. | |
Re: >Is there a method that already exist that i can use to find if in an input >there are alphabets or symbols eg $, # but not operators eg /,+,-. No, that's specialized behavior. However, the functions in ctype.h will go a long way toward writing your own. The ones … | |
Re: The behavior is equivalent to: [code]sub sp,2 mov [sp],[si] [/code] But that's not valid code because sp can't be used for addressing and memory to memory moves are illegal. To get the same effect legally, you could do this: [code]sub sp,2 mov bp,sp mov ax,[si] mov [bp],ax [/code] But that … | |
Re: >if there a command that do it? No, the framework doesn't exist for this, so you would need to add it on your own. You *can* do it with standard streams such that a single write statement copies to a file or vector of files that you choose, but that's … | |
Re: >fflush(stdin); Ack! I'll not allow such heresy on this forum. ;) The fflush function is only defined for output streams, and the behavior is unpredictable at best when you give it an input stream. [QUOTE=WolfPack]fflush() flushes out all the remaining characters in the stream thereby clearing the stream of the … | |
Re: >is it bad to not be a student on this page What gave you that impression? We help everyone: students, hobbyists, professionals, and anything else you can think of. Now, we do have a tendency to discriminate against the willfully ignorant and the lazy, but if you're not one of … |
The End.