2,898 Posted Topics

Member Avatar for DavidB

> 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 …

Member Avatar for DavidB
0
337
Member Avatar for sanyam.mishra

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 …

Member Avatar for sanyam.mishra
0
725
Member Avatar for Xantipius

> 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 …

Member Avatar for Xantipius
1
247
Member Avatar for phorce

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 …

Member Avatar for diafol
1
473
Member Avatar for Xantipius

> "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 …

Member Avatar for Xantipius
0
289
Member Avatar for Stuugie

"You become more and more mature as you age, up to when you're about 20, after that, you just get older." -- Judd Apatow

Member Avatar for BigPaw
0
439
Member Avatar for Mr.UNOwen

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 …

Member Avatar for mike_2000_17
0
187
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for Mr.UNOwen

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.

Member Avatar for mike_2000_17
0
199
Member Avatar for Suzie999

@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 …

Member Avatar for Suzie999
0
203
Member Avatar for cproger
Member Avatar for minitauros
Member Avatar for DanDaMan

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) …

Member Avatar for sanjila007
0
1K
Member Avatar for happygeek
Re: Erk

> 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.

Member Avatar for happygeek
0
143
Member Avatar for pbsarg

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 …

Member Avatar for mike_2000_17
0
199
Member Avatar for maml

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 …

Member Avatar for annaharris
0
389
Member Avatar for Xantipius

> 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 …

Member Avatar for Xantipius
-1
270
Member Avatar for massivefermion

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?

Member Avatar for massivefermion
0
129
Member Avatar for cnet1989

> 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 …

Member Avatar for mike_2000_17
-1
620
Member Avatar for mattster

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 …

Member Avatar for Assembly Guy
0
857
Member Avatar for Thundermunch

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 …

Member Avatar for mike_2000_17
0
307
Member Avatar for Labdabeta

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 …

Member Avatar for mike_2000_17
0
227
Member Avatar for Xantipius
Member Avatar for Xantipius
0
396
Member Avatar for Stuugie

> 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 …

Member Avatar for Reverend Jim
0
205
Member Avatar for Ancient Dragon

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.

Member Avatar for diafol
0
216
Member Avatar for wolframP

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 …

Member Avatar for Ancient Dragon
0
7K
Member Avatar for WDrago
Member Avatar for deceptikon
0
171
Member Avatar for mike_2000_17

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 …

Member Avatar for Dani
1
216
Member Avatar for clbembry

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 …

Member Avatar for clbembry
0
280
Member Avatar for MasterHacker110

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 …

Member Avatar for MasterHacker110
0
269
Member Avatar for chrispitt

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 …

Member Avatar for ravenous
0
114
Member Avatar for MRehanQadri

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). …

Member Avatar for MRehanQadri
0
2K
Member Avatar for delta_frost

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/).

Member Avatar for delta_frost
0
336
Member Avatar for Ecaz

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 …

Member Avatar for Ecaz
0
404
Member Avatar for Kanoisa

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 …

Member Avatar for mike_2000_17
0
206
Member Avatar for Ketsuekiame

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 …

Member Avatar for mike_2000_17
0
267
Member Avatar for Kesarion

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 …

Member Avatar for Kesarion
0
264
Member Avatar for Yogeshp

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 …

Member Avatar for rpcob
0
191
Member Avatar for faridansari

> 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).

Member Avatar for mike_2000_17
0
664
Member Avatar for waqas.zafar.125

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 …

Member Avatar for Ketsuekiame
0
237
Member Avatar for McLaren

It's also nice to be a native-code programmer, because [you always have an excuse to take a break](http://xkcd.com/303/).

Member Avatar for Ketsuekiame
0
116
Member Avatar for Ancient Dragon

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 …

Member Avatar for TrustyTony
1
400
Member Avatar for Ancient Dragon

> 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 …

Member Avatar for Agilemind
1
1K
Member Avatar for TarkiB

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 …

Member Avatar for mike_2000_17
0
380
Member Avatar for srivardhanms

> 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 …

Member Avatar for Yerbantherack
0
271
Member Avatar for MasterHacker110

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 …

Member Avatar for MasterHacker110
0
436
Member Avatar for Xantipius

> 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 …

Member Avatar for <M/>
-1
807
Member Avatar for Stein102

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 …

Member Avatar for Stefano Mtangoo
1
195
Member Avatar for Griff0527

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 …

Member Avatar for mike_2000_17
0
3K
Member Avatar for game06

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 …

Member Avatar for James singizi
0
663

The End.