1,359 Posted Topics
Re: I am going to give you the same advice I give all the students who come here whose professors' are requring them to use Turbo C++ for current-day coursework: * Stand up in class, explain to your fellow students that the professor is teaching out-of-date and **useless** information that will … | |
Re: First off, just to be pedantic about it, Dev-C++ and Eclipse are not themselves compilers; they are development environments which call (presumably) the GCC compiler (which to be even more pedantic, is not actually a compiler either, just a driver for the compiler and linker). I know it sounds picayune … | |
Re: **mulusew:** Please do not hijack other people's threads, especially if all you are going to do is beg for someone to do you homework for you. Please start a new hread of your own, and demonstrate that you have put some effort into it yourself before you expect us to … | |
Re: I think you will find that much of what you are looking for can be more readily found at the [OSDev.org](http://osdev.org) wiki and forums than here. There is a great deal of specialized information on hobbyist operating system development, and they can offer more detailed advice. However, I am curious: … | |
Re: I will also warn you that while the conventional tree-recursive algorithm is much simpler than the iterative algorithm, it is extremely inefficient, being of order *O(Fib(n))* in time and *O(n)* in space. This is because (for example) for fib(5), you have to compute fib(4) and fib(3), which in turn have … | |
Re: OK, and what problem are you having? Can you explain in detail what is going on, and where you need further help? | |
Re: I don't think you actually would want to treat the spaces (or whitespace in general) any differently from the other plaintext, actually; you want to write the ciphertext out in a form that gives as little information as possible to a cryptanalyst, so enciphering the whitespace would make more sense. … | |
Re: Before proceeding, could you tell us which assembler you are using? Different assemblers, even ones for the same CPU, can have very different syntaces, and the one you are using seems unfamiliar to me. I am guessing it is [HLA](http://www.plantation-productions.com/Webster/HighLevelAsm/index.html), but I don't know enough about it to say for … | |
Re: The short answer is, it is using pointer arithmetic to compute the location of an index `B` in an array of `USHORT` (where `USHORT` is a `typedef` equal to `unsigned short`) pointed to by `C` (I assume that somewhere in the elided code, `C` is being set to either am … | |
Re: Let's back up a bit, however, as I suspect that there is a matter of terminology to be resolved. Is the question the *running time of the code* (which will vary depending on the machine it is run on, the memory usage, the system loading, and a host of other … | |
Re: It may be possible in some cases, but not in the general case. I think one can categorically state that if it is, then either the cipher or the key in question is too weak and shouldn't have been used in the first place - unless this is a test … | |
Re: A few questions that may help us help you: * Has the professor presented flowcharts (as opposed to more modern diagramming practices) as a regular part of designing programs? * Does the professor mandate the use of Turbo C++ as the compiler? * Is this course for the C++ language? … | |
Re: It could help if, rather than posting the JavaScript/JQuery code that generates the form being sent, we could see the Python code that is reading it in from the server. There are several ways that can be done, depending on the libraries and/or frameworks you are using. Let's step back … | |
Re: **@rubberman**: While your answer is strictly correct, I suspect that the professor who gave this question was being idiomatic (or perhaps merely idiotic) and not expecting the students to be quite so literal about it, in which case C) would be the expected (if subtly wrong) answer. Of course, it … | |
Re: A few pieces of advice: * The heart of the problem you are having is that you haven't initialized the free memory handle (`first`) before using it. I would start by writing a function to do that and calling it at the start of the program (the reason you don't … | |
Re: Could you tell us what CPU this is for, and what simulator you are using? It looks like some form of M68K assembly to me offhand, but I without knowing which simulator you are using, I couldn't exactly replicate the circumstances of the program. | |
Re: Frankly, I haven't had the chance to look the class over in detail, but my impression is that there is too much being 'baked in' to this one class, and that much of it could be separated out into subclasses. Were I designing this, I would make `image` an `abstract` … | |
Re: Well, the first thing to know is that C++ doesn't have any *standard* graphics system the way that, say, Java does. So the question of the platform you are working on (e.g., Windows, Linux, MacOS) is relevant. You also need to decide if you want to target just that one … | |
Re: Ah, a good question, and one I am actually glad to see here. It shows some thought beyond the usual questions here. However, I should caution you that thater are a lot of ways to approach this issue, and which is going to work for you will depemnd on both … | |
Re: The standard `Datetime` and `Calendar` classes only work with [Gregorian calendar](https://en.wikipedia.org/wiki/Gregorian_calendar) dates; however, after some searching I did find a [project on Sourceforge](http://sourceforge.net/projects/pythondateutil/) for a multi-calendar utility module for Python, and it does specifically include the Persian calendar. Assuming it works, that may be what you need. | |
Re: What assembler are you using? Since this looks more like Pascal than assembler, I am guessing HLA, but I am not familiar with it personally so that's at most a guess. Syntactically, HLA works very differently from your average assembler, and I don't know who if anyone here is going … | |
In light of the regular if slow traffic in certain specialized questions - especially regarding operating systems development and compiler development - I would like to suggest that a sticky be added to the Software Development forum giving links to specialized sites such as OSDev.org, where those sorts of questions … | |
Re: Yes, we can, but we'd need to know what you have done already, or at least what you know how to do. We might need to see your code, or at least the part you are having problems with. If you need to post part of tyour code, use the … | |
Re: You probably won't be surprised to find out that this has been [discussed here at length before](https://www.daniweb.com/software-development/python/threads/419902/best-python-ide), nor that no real conclusions were ever reached. The appeal and value of a development environment is a highly ideosyncratic thing, and what works for one programmer often doesn't suit another. For what … | |
Re: We are certainly willing and able to help, but we'd need to know what sort of help you need. What have you done so far, and where are you stuck? Do you know the basics of how to write a function, how to use Python arithmetic, and so forth? Do … | |
Imagine knowing from an early age that you are different somehow, but can't understand how - or worse, you *do* know, but can't get anyone else to believe you. Imagine feeling that something is wrong with you, that the person you seem to be on the outside isn't who you … | |
Re: While I wouldn't actually be Ranma Saotome. I do often wonder how I could find my way to Nyannichuan to take a swim. | |
Re: [This post](https://www.daniweb.com/software-development/computer-science/threads/452680/help-porject-topic-needed#post1962794) contains several serious (and some not so serious) suggestions that you might want to look into. | |
Re: Well, first, can you give us some more detali about what it is doing, and where it is failing? I did note that you are calling the `swap` routine with a branch, and then explicitly jumping back to `processArray`. I don't know if this is related to the problem you … | |
Re: That depends on what the label `userscore` is for. Is it a single `dword` holding the value as an integer, or is it a `byte` buffer holding a string? In other words, assuming NASM syntax, is it: userscore: resw 1 ; or 'userscore dw ?' in MASM or userscore: resb … | |
Re: For which operating system, and for what sort of devices? | |
Re: A little history here: the original impetus for interfaces, when they were introduced in Java (circa 1992, when it was still code-named Oak) was as an end-run around multiple inheritance. Some languages, such as C++ and Smalltalk-80, allowed a class to inherit from more than one parent class; this was … | |
Re: I think you'll find that the code you have used in that specific section is **not** Java, but JavaScript, a completely unrelated language despite its name. Java does not have a `function` keyword, among other things. (On an unrelated note, I might add that your screen name is somewhat... unnerving … | |
One of the more common functions in any language is conversion of an integer to a string. This implementation, which demonstrates not only the common function activation record format but also a simple recursive function, was written in response to a recent question in which the OP posted an incomplete … | |
Re: While SenthilAnand's point is correct, and excellent advice, it is not the source of the compilation error; the compiler is perfectly happy to let you perform an assignment in the conditional, it just usually isn't what you intended and will have unexpected results when run. The real problem is that … | |
Re: To clarify, the link to the [list of forum rules](https://www.daniweb.com/community/rules) can be found at the bottom of any Daniweb page. The most relevant rule here is: > Do provide evidence of having done some work yourself if posting questions from school or work assignments The purpose of the forum is … | |
Re: You are required to use Turbo C++, then? Is this a policy of the professor, or of the institution? | |
Re: Assuming you aren't being required to write your own trig functions - a daunting task - then the functions you want are in the legacy C library header, [<cmath>](http://www.cplusplus.com/reference/cmath/). That's about as much assistance as we can give, however, until you have demonstrated some effort on your own part. | |
Re: No, you don't. You want to stay away from `gets()` entirely, in fact. The function is extremely dangerous, because it is prone to buffer overruns, and no experienced C/C++ programmer still uses it. | |
Re: If you have Windows Vista or later, you won't be able to install Turbo C++, at least not directly. Turbo C++ is simply too old, being a 16-bit MS-DOS program, and is no longer supported by modern versions of Windows. In order to install it, you would need a DOS … | |
Re: OK, you have some pseudo-code outlining the basic direction of the program, but you haven't told us what you are having trouble with yet. It isn't clear if the pseudo-code is yours or if it was provided as part of the assignment, though if the latter, it has some definite … | |
Re: OK, so your real goal has to do with implementing a property system in C++, then? | |
Re: The problem isn't with how you are loading the character into the array, but where the `$a0` register is pointing when you go to print it. Remember how you incremented it by one when you went to insert the zero delimiter? Well, it's still pointing at that delimiter. a better … | |
Re: `<iostream>` and `<cmath>` are the headers for two different parts of the standard C++ library. The `<iostream>` library contains the basic input and output classes and objects, including `cin` and `cout`. You include it whenever you want to work with I/O streams. The `<cmath>` library, as the name implies, contains … | |
Re: Most of these error messages seem to stem from the lack of a declaration for the `CvEM` class, either directly or indirectly. Are you certain you have all of the headers included that you need? | |
Re: I think you will find that the problem lies less with your program than it does with the way Notepad renders the codepoints. I don't know all of the details of how Notepad determines how to interpret the characters, but if I read what you are saying correctly, it basically … | |
Re: Well, then, that's quite a problem. What have you tried so far? Did the instructor provide all of the necessary information for you to compute the voltages? Have you discussed the matter with the instructor? | |
Re: I don't know ARM assembly from prior experience, but I would start by looking up the [Cortex M4 documentation](http://infocenter.arm.com/help/topic/com.arm.doc.dui0553a/index.html), if you haven't already done so, and get familiarized with the relevant instructions, especially those involving [memory access](http://infocenter.arm.com/help/topic/com.arm.doc.dui0553a/BABGIFCI.html). Assuming you are using characters in the ASCII range, you'll specifically want the … | |
Re: This looks an awful lot like an exam question, which makes me wonder if I should bother, but here goes. Regarding the loop itself, do you know how to a) set a register's value to zero, b) compare two values for equality, and c) add one to a register and … |
The End.