2,898 Posted Topics
Re: 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 … ![]() | |
Re: 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 … | |
Re: 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); } | |
Re: Can you clarify what you are asking? I really don't understand this question at all. | |
Re: 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. | |
Re: > 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 … | |
Re: 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' … | |
Re: 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, … | |
Re: 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). | |
Re: 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). | |
Re: 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 … | |
Re: 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( … | |
![]() | Re: 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. |
Re: 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 … | |
Re: 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 … | |
![]() | Re: 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 … |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: > 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
![]() | |
Re: > 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 … | |
Re: 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), … | |
![]() | Re: 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 … |
Re: 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 … | |
Re: I use KDevelop. Great code-completion, great plugins and build system support, decent debugging capabilities, and much more. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: I'm guessing that [Pruno](http://en.wikipedia.org/wiki/Pruno) is more popular in american prisons, it sounds very delicious... | |
Re: 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 / … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: > 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: > 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 … | |
Re: You should filter them to a different directory of your mailbox. | |
Re: We now have a live chat integrated into the site. See here: https://www.daniweb.com/chat | |
Re: 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. | |
Re: iso and img are the same thing. They are two possible extensions for the same file format. | |
Re: 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 … | |
Re: 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 … |
The End.