2,898 Posted Topics

Member Avatar for cannon_1

The `-I` options are for "include directories". There should be a setting in Xcode to allow you to specify a list of include directories, in which you would enter `api` and `../C/api` (or as absolute paths). For the cpp files, you just add them to your project. N.B.: I don't …

Member Avatar for iamthwee
0
288
Member Avatar for Farrukh saleem

No. Unix pre-dates Linux by a lot. [Unix](http://en.wikipedia.org/wiki/Unix) was basically one of the very first operating systems, from the earliest days of computing. Along with a few other early and often related operating systems, most notably [BSD](http://en.wikipedia.org/wiki/Berkeley_Software_Distribution), they set the industry standard for what operating systems are and how they …

Member Avatar for ShouldAt3
0
355
Member Avatar for cambalinho

You have a superfluous `*` character on line 3. This should work: bool operator==(const image &other) const { return (other.btBitmap == this->btBitmap) } bool operator!=(const image &other) const { return !(*this == other); }

Member Avatar for cambalinho
0
289
Member Avatar for nwankpa.daniel.3
Re: c++

Can you clarify what you are asking? I really don't understand this question at all.

Member Avatar for mike_2000_17
0
59
Member Avatar for hamza.muzaffar.96

What have you tried so far towards solving this problem? We will not do your homework for you. You need to show that you are making efforts towards doing this yourself, and we can help you with specific issues that you are having with it.

Member Avatar for ddanbe
-1
189
Member Avatar for myk45

> Volatile allows a global or shared variable to be read and written attomically. That's not true (maybe you are confused with Java's volatiles? For Java 5 and up, "volatile" is equivalent to C++11's `std::atomic`). It's a common misconception (that I must admit, I used to have too). Volatile variables …

Member Avatar for myk45
0
1K
Member Avatar for Luffy

The characters that you get from `getch()` should be put into the "b" array, like so: // ... cout << "Enter Password: "; int i = 0; while((i < 29) && (c != '\n')) { b[i] = getch(); cout << "*"; ++i; } b[i] = '\0'; if (a[0]=='l' && a[1]=='u' …

Member Avatar for deceptikon
0
6K
Member Avatar for RikTelner

VMs provide a pretty low-level sandbox, which means that there aren't many ways to "break out" of the VM, because within the VM there isn't much that you could see from the host. With a basic setup, there is, as far as I know, nothing that transpires between them. However, …

Member Avatar for Slavi
0
308
Member Avatar for Farrukh saleem

You don't need to do anything to access the current working directory... by definition, the current working directory is the directory that you are currently accessing. If you want to know the full path of the current working directory, you can just use the `pwd` command, as it explains [here](http://en.wikipedia.org/wiki/Pwd).

Member Avatar for mike_2000_17
0
81
Member Avatar for Sonia11

The problem seems to be that you are not linking against the correct library. You need to link against the gpu-enabled library, as shown [here](http://stackoverflow.com/questions/13228762/opencv-2-4-3rc-and-cuda-4-2-opencv-error-no-gpu-support).

Member Avatar for mike_2000_17
0
2K
Member Avatar for RobertHDD

I think that the temperature estimates are a bit naive. They seem to be obtained by assuming that the surface temperature is proportional to the amount of radiation it receives from the Sun, therefore leading to a inverse-square to distance law for the temperature, starting from the current position and …

Member Avatar for RobertHDD
0
874
Member Avatar for Muhammad_75

When you open a file to read from it, then it will not open successfully if the file does not exist. You can check if the file has been opened successfully with the `is_open()` function, like this: if( rstudents.is_open() ) which you could use in a loop like this: while( …

Member Avatar for mike_2000_17
0
241
Member Avatar for alan91

We will not do your homework for you. Have you tried? What code do you have so far? Do you have a specific problem? You have to show some efforts before we can help.

Member Avatar for Lardmeister
0
2K
Member Avatar for Ahmad Imran

C and C++ differ by two plus signs. C and C# differ by one pound character. C++ and C# differ by the replacement of two plus signs by a pound character. Was that the answer you were looking for? Because I can't tell what you want us to explain other …

Member Avatar for deceptikon
0
330
Member Avatar for Smn

This depends on which compiler you are using. If you use Visual Studio (presumably on a 32bit Windows), then you can install a 64bit cross-compiler (and the necessary auxiliary tools and libraries), as it says [here](https://msdn.microsoft.com/en-us/library/ms246588(v=vs.90).aspx). Of course, if you use a version of Visual Studio that is older than …

Member Avatar for mike_2000_17
0
3K
Member Avatar for humorousone

Besides a few crazy little tricks that rely on goto's, there are two canonical use-cases for goto's. The goto's are not absolutely necessary in those cases (you could do without them), but they are not too harmful and make things somewhat simpler. That said, the gag reflex of most programmers …

Member Avatar for JamesCherrill
0
273
Member Avatar for Jack_11

My first inclination would be to think that these are the wonderful illusions of youth. I just speak from experience. The kind of feeling you describe is something that I have felt far too often to count. It's sort of a case of "the sun always shines before the clouds …

Member Avatar for <M/>
0
672
Member Avatar for cypherscouter13

First of all, you have to make sure that you compiled the project with debugging symbols enabled. How you do that would depend on the project itself and the way it has its makefiles setup. Then, to trace back the origin of segmentation faults, gdb is not a good tool …

Member Avatar for Moschops
0
264
Member Avatar for muhammad_74

I have an old laptop from roughly the same generation (similar specs, core 2 duo and 1 GB of RAM), and I run [Lubuntu](http://lubuntu.net/) on it, which is a light-weight variant of Ubuntu that works very well for such older hardware. That's what I would recommend for your hardware. There …

Member Avatar for muhammad_74
0
369
Member Avatar for Jack_11

There are high-level languages that can do low-level things. C++ is the main one. Part of the problem is that many people label a language as being low-level when it allows low-level things to be done with it (direct memory accesses, memory casts, kernel-space programming, etc..). That is basically a …

Member Avatar for mike_2000_17
0
283
Member Avatar for Mubeshier

Headers like "conio.h" and "graphics.h" are extremely old and obsolete headers from another era. I think that they are too old even for an ancient IDE like Dev-C++ 4.9.9.2. The direct graphics (GDI) that this library uses has been deprecated for quite some time. I think there is probably still …

Member Avatar for Duoas
0
1K
Member Avatar for muhammad_74

> 1.Does it runs chromium browser. Unless it is a very old version of a distro, any Linux distro will run Chromium just fine. Some distros don't like Chrome because of ideological reasons (not FOSS), but you can override that if you really want Chrome instead of Chromium (but they …

Member Avatar for muhammad_74
0
249
Member Avatar for <M/>
Member Avatar for nitin1

Well, as rubberman said, reentrancy is a more theoretical notion about formal analysis, but I would also add that in terms of multi-threading, reentrancy provides a very strong guarantee that this will work as expected when invoked concurrently (simultaneous threads that execute the same function). You have to understand that …

Member Avatar for mike_2000_17
0
2K
Member Avatar for mrhunt

As rubberman says, the possibility of repeated base-classes (which can be solved with virtual inheritance) is one problem. Another problem is with other ambiguities between inherited classes, like data members or member functions with the same name in the different classes (even if those members are private, the ambiguity will …

Member Avatar for Maritimo
0
165
Member Avatar for Dani

I can **confirm** the behavior that cereal described as "**Problem 2**". I get the same weird jumpy cursor issue. I'm also on Chrome (Chromium, actually) in Kubuntu. **Problem 3** Another issue that I have noticed is that, as you all know, I tend to write long posts. The editor box …

Member Avatar for Dani
3
702
Member Avatar for diafol
Member Avatar for MasterChat

> I live in california... so i get both... That's a joke, right? When does it get cold in California? I mean, even in the Sierra mountains in the middle of winter, it barely goes below -10C (15F). I think you don't know what cold is. For us canadians, Vancouver …

Member Avatar for RobertHDD
0
189
Member Avatar for sweetsmile

And generally speaking, allergies and other breathing discomfort is mostly caused by the larger particles and mold in the air. The pollutants (i.e., "chemicals" as some fools might call them) that are disolved in the air might have some bad implications for your health in the long term (like carcinogens), …

Member Avatar for sweetsmile
0
481
Member Avatar for humorousone

First, there can never be too many comments on interfaces, that is, function declarations, class declarations, modules, or whatever else your language has as interfaces between the users and the library code. The only limiting factor in documenting interfaces should be the time you have and the efforts you are …

Member Avatar for rubberman
0
153
Member Avatar for lewashby

Like rubberman says, SSH can be an annoying method. The problem with trying to rely on SSH connections via GUI applications (like a file explorer) is that SSH can sometimes issue warnings about keys that have changed or otherwise ask for additional steps. In some cases also, the GUI application …

Member Avatar for lewashby
0
355
Member Avatar for Transcendent

I use KDevelop. Great code-completion, great plugins and build system support, decent debugging capabilities, and much more.

Member Avatar for rubberman
0
243
Member Avatar for nitin1

Warning: Software engineers love to provide vague definitions for every term, and then, they vehemently insist that they are very different and should not be confused for one another. Basically, information hiding and encapsulation are, in a way, two sides of the same coin. The idea of information hiding is …

Member Avatar for rubberman
0
255
Member Avatar for tapananand

Open source does not only apply to programming. If you consider "source" as meaning any kind of blueprints, models, design specifications, or typesetting (word document or latex files), basically anything that is the basis for making something whether it is a software, a book, or a physical product of some …

Member Avatar for mike_2000_17
0
195
Member Avatar for Tcll

This looks like any typical package management system, like rpm (red-hat family), dpkg (debian family), apk (android), and so on... of course, I don't think Windows has anything equivalent to this... but again, that's what Windows users are used to, as sub-par system. There are several tools out there that …

Member Avatar for Tcll
0
214
Member Avatar for Xantipius

I'm guessing that [Pruno](http://en.wikipedia.org/wiki/Pruno) is more popular in american prisons, it sounds very delicious...

Member Avatar for HiHe
0
187
Member Avatar for EddieC

And their Visual Stupido on Linux is, of course, some remote access cloud-based thing that no sane programmer would ever want to use, but are so annoyingly easy to sell to the I-have-no-clue-what-my-employees-actually-do kind of managers. They probably sell this to managers by telling them that the remote access / …

Member Avatar for mike_2000_17
1
1K
Member Avatar for Maryam_6

Linked lists have nothing to do with matrices, as far as I know. And even if they did, it would be beyond idiotic to use them in that context. And as Maritimo pointed out, we are not in the business of doing people's homeworks for them. We provide help in …

Member Avatar for Maryam_6
0
180
Member Avatar for mikeandike22

I agree that D might turn out to be another "Esperanto" programming language. D seems to have tried to satisfy everyone, and therefore, pleases no one. I remember how Andrei was pitching D to C++ programmers by painting the language as essentially the same as C++ but with cleaner syntax …

Member Avatar for The Old Man
1
476
Member Avatar for kks21199

If you only intend to read from the file, then you should only give the `ios::in` flag. Because the default behavior with `ios::out` option is to create the file if it does not already exist. Also, you should use `ifstream` instead of the more general `fstream`. It's always better to …

Member Avatar for kks21199
0
2K
Member Avatar for kungle

> I also sujest you to compile some files with -O3 and others with the -Og option That could be problematic, especially for the STL. Since most of the STL is header-only libraries (templates), the parts compiled without debugging and the parts compiled with debugging will end up compiling a …

Member Avatar for Maritimo
0
605
Member Avatar for lewashby

The easiest is probably to use `chown` to change the owner of the directory after you've extracted it. And you can use `chmod` too to remove some permissions for group and others too. Let's say you have the file `my_archive.tar.gz` which contains a top-level directory called `my_folder`, and the user …

Member Avatar for rubberman
0
709
Member Avatar for Dani

I like the idea overall. Not uber-excited about it, but there is some potential there. I'm not so sure about using the PM mechanism to notify about bounties. I think that if this feature takes off, some of us will have a flooded inbox. Maybe something more like the chat …

Member Avatar for Dani
0
2K
Member Avatar for Zaprzap

> 1) Is this statement correct: In memory, elements of an array are stored "against" each other (I think more precisely, contigious space is allocated for them?) and a pointer to an array points to the first element. Yes. This statement is correct. > 2) Are there any memory-specific issues …

Member Avatar for Zaprzap
0
231
Member Avatar for matrixdevuk
Member Avatar for matrixdevuk
0
235
Member Avatar for ShawnReynolds

We now have a live chat integrated into the site. See here: https://www.daniweb.com/chat

Member Avatar for Dani
0
244
Member Avatar for ~s.o.s~

This is really sad... He was such a nice guy and a staple of this community. He had a wealth of knowledge and always a great attitude with everyone. He will be missed very much. RIP Mel.

Member Avatar for CodyOebel
2
792
Member Avatar for tony75

iso and img are the same thing. They are two possible extensions for the same file format.

Member Avatar for Gribouillis
0
7K
Member Avatar for ITPT

There are quite a few pieces of software that can do that. Own nice option is to just use [rsync](http://en.wikipedia.org/wiki/Rsync). This software is easy to automate (e.g., bash script / cron job), and provides many useful options and features. It's an incremental backup tool, meaning that each time (e.g., each …

Member Avatar for Viola71
0
369
Member Avatar for myk45

According to the documentation, the `setHtml()` function sets the html data directly (as a QString containing the html code), and you can use `toHtml()` to retrieve that html code later on. If you got an html page from some URL and you dumped the html source code from that page …

Member Avatar for myk45
0
484

The End.