3,183 Posted Topics
Re: > Dev-C++ is a compiler. It compiles source codes in the language C and C++ to object code. Dev-C++ is not a compiler, it's an IDE. The default compiler is GCC from the MinGW project, but you can actually change which compiler the IDE uses to compile your code. MinGW's … | |
Re: It's a logical address. > I may not be clear in the defination of physical and logical address. thanks if you can help me ;) Physical addresses are the actual spots in memory. Logical addresses are a set of pretend addresses assigned to each process that are mapped into physical … | |
Re: > like nlogn +n , then the overall complexity is ? nlogn, because for the most part, insignificant factors are ignored. nlogn overwhelms n, so n is tossed away. | |
Re: All members have a one time option to change their name from their profile page. The link is at the bottom and is cleverly disguised as a button labeled "Edit Username". | |
Re: If the only requirements are to use `switch`, `for`, and `if` constructs then your imagination is the limit. Start by writing down use cases for a car rental service, this will help you get a feel for features the application will need to support. You can't write a program that … | |
Re: > By the way, it was something wrong when I posted this, so had to put all the text in a code block. Our code validation algorithm will very likely prevent you from posting when you format your text like a letter or formal prose (ie. leading paragraph indentation) because … | |
Re: Why did you create a new thread for the same question? | |
Re: > What is your Favourite Hack/Programming movie ? Hackers. It's just so over the top that I end up laughing and enjoying myself rather than raging at the idiocy. Oh, and boobies. ;) | |
![]() | Re: Wait, you're a novice and you've been given an assignment to write a floating point pow() without any math.h functions in the first few weeks of a CS course? Something seems off there, because this isn't exactly a trivial exercise. For example, take a look at [the implementations here](http://code.google.com/p/c-standard-library/source/browse/src/std/math.c). They're … ![]() |
Re: > I mean i know that i am accessing data outside the array but where? You use a debugger to figure it out. Most debuggers will give you the option of setting a break condition; you can use a condition of the array index being out of range. Alternatively, you … | |
Re: "Not running" is not helpful. But because you've stumbled on a very common problem of mixing formatting and unformatted input, it's easy to guess what the real problem is. Replace this line: gets(a[i].name); With this: while (!gets(a[i].name) || !a[i].name[0]) ; The problem is that gets() will stop reading when it … | |
Re: [This paper](http://neumannhaus.com/christoph/papers/2005-03-16.DFA_to_RegEx.pdf) came up as hit #1 on google. Have you done any reseach on the subject? | |
Re: > `Lower_Bound_Rand = rand() % Lower_Bound;` > `Upper_Bound_Rand = rand () % Upper_Bound;` > `Range = rand()% Lower_Bound && rand()% Upper_Bound;` So you're saying that Range will be either 0 or 1, with a very very strong bias toward 1. The result of the && operator is a boolean value, … | |
Re: > So, i need create a program that will interpret the source code (obviously the input/output, logical. like 1+1, then it would just output the '2') using the symbol table. So...you want to write a compiler. If the symbol table is already generated, that simplifies your job, but not a … | |
Re: Visual C++ supports kbhit() and getch() in the conio.h library, together they do what you want. | |
Re: Please point out where you're calling `birth[i].input()`. | |
Re: `inputVal` is not a pointer, yet you try to dereference it like a pointer. | |
Re: "Homework" in this sense is any small exercise that is intended for learning, practice, or personal gain. * Learning exercises don't teach you much if you're told how to do it or given the solution. * Practice exercises don't let you practice when someone else does it. * Since the … | |
Re: Post your code for B please. That's the closest you have, and it'll probably be easier to fix a minor bug than direct you toward the appropriate algorithm. | |
![]() | Re: > I think the work envoirments are a bit to much centered around verbal and direct communication for me. Good luck finding any lucrative career that isn't. Rather than running away, you should be working to improve your communication skills. > in agile teams > And the open office layout … ![]() |
Re: I do occasionally, but it's more productive working in the office and when I can talk to my coworkers in person. | |
Re: > I'm getting error "Segmentation fault(core dumped)" if I append numbers to list2. Obviously you have an invalid pointer somewhere. I'd wager that either you're not properly checking for NULL before dereferencing the pointer, or you neglected to set a `link` to NULL when creating the list. Either way the … | |
Re: Yes, someone can help you. http://www.catb.org/esr/faqs/smart-questions.html | |
Re: I wouldn't call it a debate at all, more like some know-it-all being pwned by someone who actually knew what she was talking about. By the way, this thread is 6 years old... | |
Re: > So we still know the fundamentals but nothing too advanced for decent oops. The humorous thing is that in a few years you'll probably see "decent OOP" as unmaintainable shit and revert back to the fundamentals. The process of learning, especially with C++, seems to revolve around overcompensation. You … | |
Re: > I check the value range of double and long double with vs2010, but it gives me the same value. Yes, `long double` is pretty much just a synonym for `double` to Microsoft's C++ compiler. In fact, Microsoft even [recommends against](http://msdn.microsoft.com/en-us/library/9cx8xs15(v=vs.100).aspx) using `long double` forms of the standard library. > … | |
Re: The simplest cursor linked list would be an array of nodes where the "next" pointer is actually just an index to another element in the array. The linked list concept is the same, all that changes is how you link to other nodes. | |
Provided below is a bare bones dynamic array library. The game is to extend this library with new primitives and features that interest you, that you've needed in the past, or that you feel may be useful. The intention of this game is to give some of the newer folks … | |
Re: fgets() is bad only if you don't understand how it works. I'd wager that the label of "unreliable" in the page you linked to has to do with how fgets() handles partial lines. If the line in the stream is longer than the buffer provided to fgets() can hold, no … | |
Re: The most basic solution is to wrap the code in `pre` tags to preserve the formatting. But be careful with C++, because you'll need to remember to escape certain characters like angle brackets and the `&` operators, otherwise they'll be stripped when the browser can't interpret them as HTML. It's … | |
Re: > as i am taking result as double which always a approximate value so multiplying this (result\*result) will give me the correct output ? Your concern is justified. To be strictly correct your equality check should add a fudge factor: result *= result; if (fabs(result - number) < FUDGE) puts("The … | |
Re: > Can you please explain me this asm code snippet. It looks straightforward to me. Arguments are pushed onto the stack, _strncpy() is called, and the stack is adjusted to "remove" the arguments. Which parts are confusing you? > My reall question is how allocated memory on stack that doesn't … | |
Re: You realize that by calling out Walt, you've guaranteed that he'll blast you for not using any formatting and for unnecessarily living in the 90s with Turbo C++, right? | |
Re: Your push() member function is broken. In the case where top isn't NULL, you have three lines: top -> next = temp; top = temp; top -> next = NULL; The first thing to notice is that `top->next` is always reset to NULL, *always*. That line is a bug and … | |
Re: Arrays cannot be compared with the == operator. You really have no choice but to loop over the elements and compare them onesie twosie: int equal = 1; /* Equal until proven otherwise */ int i; for (i = 0; i < 5; ++i) { if (output_1[i] != output_2[i]) { … | |
Re: > ItemList list(); This doesn't do what you think it does. Due to a parsing ambiguity, the resolution of the above declares a *function* called list that takes no arguments and returns an object of type ItemList. It doesn't create a new object called list with a type of ItemList, … | |
Re: > but problem is i wana do this in nlogn by using quick sort or merge sort. and for quick making the code, i wana use the qsort() function already defined in the C. Just because it's called qsort() doesn't mean that it's implemented as quicksort. There's no requirement in … | |
Re: > can you please write how to do it using intrptr_t? Don't get confused with stuff like intptr_t. All you're doing is casting the value stored by a pointer (*not* the value stored by the pointed to object) into an integer type so that bitwise operators can be used on … | |
Re: Honestly, if I were you I would be more worried about your atrocious spelling and grammar than employers giving two shits about any cheating scandals when you were in school. | |
Re: > This is by design. I wouldn't say it's by design, but it certainly falls out of how Markdown and our code detection algorithm work. The two conspire (possibly unintentionally) to make it impossible to have quoted code tags. Markdown can handle quoted code tags with a little manual tweaking … | |
Re: > means what specific use github has ? Github is a host for [version control](http://en.wikipedia.org/wiki/Revision_control) repositories. | |
Re: Start by adding age since that's easier due to lack of string handling requirements. Add something like `int age;` to the struct definition and then everywhere the other "attributes" are used, add an equivalent line for `age`. Since your Google document is blank and you neglected to post any code, … | |
Re: From the documentation it seems CSound doesn't support fenced comments. So you can't do what you want, you'll need to reorganize things so that the comment is either the last thing on the line or on a line by itself. | |
Re: Why would you want an OCX when there are .NET barcode libraries? Anyway, are you looking to read or write barcodes? Do you just need 1D symbologies or are 2D important too? Not all barcode libraries support the same stuff, so you'll need to do a little research. Limiting yourself … | |
Re: That sounds familiar. Please try clearing your browser's cache and see if that corrects the problem. | |
Re: Well, one obvious problem is that your factorial function may return a double, but it uses an int internally to calculate the factorial. Therefore you're *still* limited to the range of a signed integer. | |
| |
Re: Theta notation is basically the same as Big O notation except instead of an upper bound, it represents a tight bound (ie. upper and lower). More formally (where Theta is the tight bound, O is the upper bound, and Omega is the lower bound): f(x) = Theta(g(x)) iff f(x) = … | |
Re: That can happen when Chrome's zoom amount changes. See if ctrl+0 fixes it. |
The End.