2,898 Posted Topics
Re: > What would your solver do with a quadratic equation where a != 0 but there is still only one root (e.g., f(x) = x^2)? That's called a repeated root, there are still two roots, they just have the same value. A proper quadratic equation solver should output two roots … | |
Re: The problem is that Turbo C++ 3.0 is an ancient 16bit compiler from 1991, and it will, by default, compile the code for the 8086 architecture (which dates back to 1978). The inline assembly in that code you are trying to compile probably uses more "recent" instructions from the 80286/80287 … | |
Re: > Who said they have to give up their native language? diafol was referring to a kind of inevitable loss of some of your native language and culture when you get into the habit of using English day in day out. I feel this very much, I've used English predominantly … | |
Re: The spelling went away when the old system (vBulletin) was replaced. It has been a constant irritant ever since. People (including me) have asked for it many times. I think there is some technical reason why it is kind of hard to do, but I don't buy it. I think … ![]() | |
Re: > "to snap" means to break in half, such as snap a twig (small tree limb). It could also mean to rub the thumb and middle finger together to make a noise -- snap you fingers. It can also mean to go crazy. "I don't what's wrong with him, he … | |
Re: "You become more and more mature as you age, up to when you're about 20, after that, you just get older." -- Judd Apatow | |
Re: Not as far as I know. There might be some compiler extension that does this, but nothing standard. This kind of thing is generally handled by the build system and/or compilation flags. Technically speaking, there could be a way to obtain information from the compiler whether a header file exists … | |
Re: Definitely, go for Boost.Python. It can effectively replace a "plugin system" by just making you C++ code into Python classes and functions. It is seemless, with only a few quirks here and there. Essentially, you can make your C++ class hierarchy be reflected into Python packages, have Python classes derive … | |
Re: Another vote for OpenMP. It's very easy, and supported by virtually all modern compilers on all platforms. It is turned on by a compiler option, and if not turned on (or not supported), the code just compiles the same but single-threaded, which is a great feature for portability. | |
Re: @rubberman: using just `extern` in front of a function declaration in C/C++ has absolutely no effect. Function declarations declare functions with external linkage by default, adding the `extern` keyword doesn't change anything. @Suzie999: You need to provide some sort of explicit example of what you are trying to do. Could … | |
Re: You can also use the term "public transit". | |
Re: Since Schol-R-LEA listed the options, I might as well complete the thought with the remark that using-statements like `using namespace std;` or `using std::cout;` can also appear within function bodies, and, in fact, that is the preferred option of "professional" programmers. So, the order of preference (from preferred to to-be-avoided) … | |
Re: > had to crawl up the stairs to bed FFS! lol, I remember having to crawl up the stairs to my hostel room once, but it was a different kind of intoxication... the self-induced kind. Glad you're OK now. | |
Re: This is really a question that you should direct to the developers of that library / program. If you say that there are already programs (within that framework) which can exchange some data (or "communicate") with the main program, then it means that this framework uses some form of inter-process … | |
Re: If the option is between this: int row_locs, col_locs; int row_descriptors, col_descriptors; double **locs; double **descriptors; call_function(row_locs, col_locs, row_descriptors, col_descriptors, locs, descriptors); and this: struct return_struct { int row_locs, col_locs; int row_descriptors, col_descriptors; double **locs; double **descriptors; }; return_struct result = call_function(); Then, it depends on whether the function gets … | |
Re: > Innamorato is an italian word, the correct transcription is with two nn, so innamorato not inamorato. It's a borrowed word. It's borrowed from the italian "innamorato", but in English it is spelled "inamorato" and means "a male lover", as opposed to the more general italian meaning of "lover". This … | |
Re: What's wrong with the [Symbian SDKs](http://www.developer.nokia.com/info/sw.nokia.com/id/ec866fab-4b76-49f6-b5a5-af0631419e9c/S60_All_in_One_SDKs.html) for Belle? | |
![]() | Re: > May I ask that this thread be deleted please? Short answer. No. It's not our policy to delete threads on request, even of the OP. The point is that this thread might help others and also contains posts that other members have taken the time to write. May I … |
Re: Overall, I'd have to say Unix. It's the basis for virtually all the main operating systems used today. It's architecture has stood the test of time. Apple's operating systems were always somewhat based on Unix and have now (with OS X / iOS) crawled back home to the Unix family … | |
Re: On line 153, I think you should be using i and j to compute the heuristic (otherwise, it would get over-estimated, which is bad for the algorithm, it will basically break it). I don't think that using the Manhatan distance is OK if you are allowing diagonal motions. The heuristic … | |
Re: You are going to have to explain what you are actually trying to achieve, because it's really not clear at all from the code. Then, there are a few obvious problems, of course. First, seeing stuff like this: typedef struct { /*something here*/ } *myNewType; makes steam come out of … | |
Re: Wednesday, April 17, 1985 Yes.. it's my birthday today! | |
Re: > While this has been alright for me and those involved in my department, I've been thinking about what problems may arise when someone other than me (in the future) has to analyze and fix the problems. Because of the lack of documentation, future maintainenance will be a big issue … | |
Re: It's the "Heading" format, done with `# some text #`. I guess we can't really be responsible for people's lack of good taste, if they decide to write some text as a Heading, so be it. ![]() | |
Re: Well, the answer to your problem (but not to your question) is to change your IDE. Dev-C++ is far too old to support C++11. The MinGW GCC version that ships with Dev-C++ is version 3.4.2, which is really old. Decent support for C++11 starts roughly from 4.6.0, but since it … | |
Re: storage In formal terms, "static" is a storage-class specifier. | |
I was just looking a this thread with a lot of quotes (people quoting each other) and there were these really weird graphics (see the attached snapshot). I'm using Chrome: Google Chrome 26.0.1410.63 (Official Build 192696) OS Linux WebKit 537.31 (@147513) JavaScript V8 3.16.14.11 Flash 11.2 r202 User Agent Mozilla/5.0 … | |
Re: Looks pretty good to me. I'm sure you know that you need to somehow make it easy for them to get access to the websites you did, because that's really the main thing they will want to see. The typing comment does sound a bit weird, especially in the MS-Word … | |
Re: I believe that the problem is due to the fact that you installed the grub bootloader on the MBR (Master Boot Record), overwriting the Windows bootloader. This is the default configuration when installing Ubuntu (and most other distro) since this is what you need when you install Ubuntu only (but … | |
Re: Inheritance in C++ is pretty much the same as [inheritance in OOP](http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)). I could hardly explain any more than the wiki page does. If you have a more specific problem, just ask. The types of inheritance in C++... well, that depends a bit. There are different categories depending on the … | |
Re: You cannot open a file in append mode (`std::ios::app`) to read from it (input). Technically speaking, it doesn't make much sense to open a file for "appended read operations". As far as the C++ standard goes, it says that this is implementation-defined (i.e., will behave differently depending on the system). … | |
Re: Did you add `glut32.lib` to the list of libraries? If it is not installed, follow [these instructions](http://visualambition.wordpress.com/2010/08/12/glut-and-visual-studio-2010/). | |
Re: I guess I agree with Labdabeta. It's a matter of balance. There are things that you need to code, and there are things that would be really stupid to do via code. The reason why drag-drop GUI designers exist is because it is really asinine to do all that in … | |
Re: As you say, there is a weird quirk about access to protected members. You can only call protected member functions on the "this" object, from a derived class. I don't know the reason behind this (if any), but it seems like a stupid rule to me. In any case, you … | |
Re: At first glance, the whole "Option 0: Do nothing" versus "Option 1: Do what I propose" just reeks of false dichotomy. If I was a law-maker I would dismiss the proposal on that basis alone. There is no way that a serious person doing a serious proposal would have found … | |
Re: NathanOliver's suggestion is reasonable: > If that is the case then I would split you main array into seperate arrays for each type. Then sort those arrays in descending order. Then find which array has the highest sum for the first three elements. Although you can also do it all … | |
Re: In the private message page, there should be three tabs: "Inbox", "Outbox", and "Send New PM". However, I think there is a lower limit of post counts required to be able to send PMs (it's an anti-spam measure, i.e., people coming in, making fake accounts, and sending tons of spam … ![]() | |
Re: > Or check in http://slackbuilds.org/ there may be Libreoffice. Indeed, [there is](http://slackbuilds.org/repository/14.0/office/libreoffice/). If all else fails, you can always compile it from [sources](http://www.libreoffice.org/download/?type=src). | |
Re: What GUI toolset are you using? Most GUI toolset will have a kind of "Canvas" widget which usually has functions for adding shapes like circles, rectangles, lines, text, etc... more or less everything you need to create a simple "Paint" application. For example, using [Qt](http://qt.digia.com/), there is a framework of … | |
Re: It's also nice to be a native-code programmer, because [you always have an excuse to take a break](http://xkcd.com/303/). | |
Re: What does "retire his account" mean? I guess it should mean that it is deactivated in the sense that it won't "participate" anymore (e.g., doesn't show up on endorsements, cannot send him PMs, etc.). But obviously, all past posts and stuff should remain, probably also the user profile (maybe with … | |
Re: > Nomatter who you are or who she was, everyone should give the dead respect. There is a fine line between respecting the departed for the sake of their family and loved ones, and creating an unfairly glorified picture of a person just because they passed away. At any point … | |
Re: As mat1998x said, the limit of 2Gb is probably imposed by the compiling or running environment (incl. the OS). It is possible that compilation in "debug mode" would include a limit like that, under the assumption that undebugged code might have leaks, I would doubt that any compiler would produce … | |
Re: > I was thinking of using sockets. Thread A prints and sends a message to thread B. Thread B prints and then sends a message to thread A. Any thread before printing checks for the message from other thread and prints only if they have received the message. You have … | |
Re: Normally, you should have `sudo` privileges. In that case, you can run any commands you want under root-privileges by writing `sudo` before it, like: $ cd /sbin/ /sbin$ sudo mkdir test_dir [sudo] password for YOUR_USERNAME: /sbin$ cd test_dir /sbin/test_dir$ To actually switch the root user within a command terminal (for … | |
Re: > I was in Baltic Sea just a few years ago (maybe 10 years ago) on a USA flag fising factory ship doing some work for the company I worked for. We were about 200 miles from Alaska shore, no one mentioned mines in the water. Perhaps they are just … | |
Re: What I want from an IDE are, mainly: - A good set of text-editor functions and have them easily accessible. By text-editor functions, I mean things like find-replace, goto-line, file search, and so on. - A good set of basic coding aids like syntax highlighting, code formatting (indenting), maybe collapsable … | |
![]() | Re: These lines will certainly cause a stack overflow: const int SIZE = 500000; string s[SIZE]; int test[SIZE]; This creates (stack-based) static arrays of integers and strings, of 500000 elements. Assuming you run this on a 32bit platform, this will probably take about 10Mb of memory (and probably twice that on … |
Re: My very first language was **RapidQ** (a freeware clone of Visual Basic). But very quickly after that, it was **Delphi** (Object Pascal) which I played around with for quite some time, while flirting with the idea of moving to **C++**, which I eventually did. But all throughout, I've also experimented … ![]() |
The End.