2,898 Posted Topics
Re: I think the real question here is: Why are you connecting to the internet with a Win XP computer? Do you like playing with fire? XP is no longer supported by Microsoft and it no longer gets any security updates or patches. I would not recommend that you continue to … | |
Re: The C standard headers `time.h` and `stdlib.h` should not be used in C++ code. You need to using the C++ versions of these headers, which are included with `#include <ctime>` and `#include <cstdlib>`, respectively. Then, any function from these headers must also be prefixed with `std::` like all other C++ … | |
Re: I think that it makes some sense to consider a Vector as a subclass of (derived from, special kind of) Matrix. For example, Matlab creates vectors as matrices (as Nx1), and treats any matrix with one dimension that is 1 as a vector, i.e., it doesn't even "subclass" them, it … | |
Re: The following site has a [pretty comprehensive list](http://www.openprinting.org/printers) of supported printers / scanners for Linux. I would say that as you buy your printer, you can just look up the model on that site before to make sure it's supported. Overall, I would say that the worst that could happen … | |
Re: Like it was said by others, the solution is to add an include of `<cstdlib>` where the rand / srand and system functions are found. I would just add that the reason this might have worked on another / older compiler is because sometimes standard library headers include other ones. … | |
Re: How long did you try the glasses you had had before? I remember that my first glasses also gave quite a ride, in terms of headaches or feeling out of balance. That got progressively better over the course of probably one month or so before it went away entirely. I … | |
Re: > class pd is privately derived from AbstractClass as both are different classes and there is no relation between them. If they are completely unrelated classes, why do you use any kind of inheritance? You should not inherit if there is no purpose to it. In fact, private/protected inheritance is … | |
Re: > What would the ivalArray() indicate? It indicates that when a Banana object is created, the `ivalArray` data member will be *value-initialized*. This is standard terminology and it boils down to meaning that it gets initialized to a default value. For all primitive types (`int`, `double`, any pointer type, etc..), … | |
Re: The `tolower` and `toupper` functions only work on a single character at a time. So, if you want to apply it to a whole string, then you need to iterate through the characters in the string and apply that function to each character. For example, if you have a string, … | |
![]() | Re: No. I would not choose to use a non unix-like system. I even consider it when looking for a job, that if they seem to be using Windows, I have to take into account the fact that this job would imply a heavy daily dose of OS-related frustrations that I … ![]() |
Re: Unfortunately, like in the real world, we cannot censor or ban people just because they have a thick skull. ;) But if a user has a habit of high-jacking other people's threads to ask his own repetitive questions, then that would be something we could warn or even infract about. … ![]() | |
Re: The CMakeLists.txt file is where you create the build script for your project. Unless you are doing something fancy, this file should be the only thing you need for setting up a build with CMake. You can look for cmake tutorials for information on how to write that. The "Config" … | |
Re: We won't do your homework for you. If you are trying to solve one of these problems and you are encountering problems doing so, then you should post what you have and tell us what specific things you are having trouble with. | |
Re: I speak quite a few languages too: 1) **Quebecois** (canadian french, grew up speaking it) 2) **English** (the main language I use today, did all my studies and relevant work in English, so, I'm fluent without much of a detectable accent (people who heard me speak English only have assumed … ![]() | |
Re: If you are planning to do some networking work with C++, I recommend that you look at [Boost.Asio](http://www.boost.org/doc/libs/1_57_0/doc/html/boost_asio.html) instead of using a crude platform-specific interface like winsock. Despite a lot of its annoying aspects, the Boost.Asio library remains the best way to do this kind of thing. I especially recommend … | |
Re: Like Slavi said, this address range is reserved for local network addresses (e.g., for everything plugged to your router). The usual reason for typing such an address in a web-browser is to access your router's configuration page (a small web-page server that your router runs to provide you with a … | |
Re: You need to post your code, or at least, a subset of it that reproduces the problem you have. We cannot help you if you don't provide sufficient information. | |
Re: So, from the link you gave, there are three files in there, and they are short enough that I'll simply post them here: CMakeLists.txt: cmake_minimum_required (VERSION 2.6) project (Tutorial) # The version number. set (Tutorial_VERSION_MAJOR 1) set (Tutorial_VERSION_MINOR 0) # configure a header file to pass some of the CMake … | |
Re: Writing modern C++ parallel code is very cutting edge, and by that, I mean very recent / experimental. I think that the main existing modern C++ libraries that enable parallelism in a way comparable to what SYCL hopes to do is Microsoft's C++ AMP and Intel's TBB. Things like Cilk … | |
Re: You need to read the [rules of this forum](https://www.daniweb.com/community/rules), especially the rule that reads as follows: **Do provide evidence of having done some work yourself if posting questions from school or work assignments** Don't copy-paste your homework assignments (or other exercises) and expect people to simply give out a fully … | |
Re: XP is no longer supported by Microsoft, meaning that you don't get any patches for security vulnerabilities and stuff. That said, XP was probably the best of the Windows versions, and it's still a perfectly good OS to use, as long as that computer has no contact with the internet. … | |
Hey, So, I'm trying to create a tutorial draft for a tutorial that I just wrote. I copied all the text into the editor, put in the title, tags, and marked it as a tutorial draft for the C++ forum. I hit the submit button and I got the following … | |
This tutorial is the first time I write about coding techniques for improving the performance of software. This is going to be a step-by-step journey through a real example, with real benchmark results at every step so that you can see the effect of the different optimization techniques. And as … | |
Re: Your comparison operator takes two *references*, but you call it with two *pointers*. When you have `&clock2 == clock2`, you are taking the address of `clock2`, which gives you a pointer `Clock*`, and then, you compare it to `clock3`, which is already a pointer. What you need to do is … | |
Re: I've always found the Pro Git book, freely available online [here](http://git-scm.com/book/en/v2), to be very helpful and definitely good for beginners. The thing with Git is that you'll eventually get an epiphany and it'll all become clear. It's mainly about understanding how diffs, commits and branches work together. One thing though … ![]() | |
Re: > Why on earth would the pointer symbol `*` be pushed back and be seperated from it's pointer name with the increment operator in the middle? The `*` is not part of the pointer name, it's part of the type when you declare the pointer, like `int* p;` which means … | |
Re: There's no tail recursion in that function. For tail recursion to apply, you generally need to have nothing appearing after the recursive call (the call to "back()"). In this case, a character is printed out after the recursive call, which means that the character value must be retained through the … | |
Re: I think it boils down to picking your battles. The small stuff like naming conventions, indentation and stuff like that is not worth breaking a sweat for, just follow the guideline and get used to it, and build your finger muscle-memory for it. But coding restrictions that you think lead … | |
Re: Well, there are a few problems with that code. I cannot, however, pinpoint where that specific error is coming from, are you sure it's within that code? Now, for the errors that I can see: First, you should not use `= NULL` for pure functions, you should use `= 0`. … | |
Re: I would echo the same sentiment as others have, no one could question the "morality" of choosing to participate (voluntarily) more to one forum or another, or none. I also visit SO regularly and post on occasion. But I feel that I wouldn't be able to keep my sanity if … ![]() | |
![]() | Re: Like others, I'm not a big buff of poetry. I guess I get my dose of poetry from well-written song lyrics. English is not my first language, so that plays into it too. I do remember, however, that during the teenage period when I was a hardcore fan of The … |
Re: This [video](https://www.youtube.com/watch?v=8ZtInClXe1Q) is also a great explanation of this issue, mainly in the form of a how not to do it and why, followed by the proper solution used today, which is hashing + salting. The basic idea is really that you don't need to store a password in plain … | |
Re: Analog computers already exist, and they are pretty great. AFAIK, they have fallen out of favor due to modern computers being so powerful now. In the older days though, analog computers were a great way to perform complex calculations. They used to use them a lot for things like control … | |
Re: Whether it's in software engineering or other engineering fields, I don't see how a university could justify having a reverse engineering course. Sure, there are some legitimate reasons to do reverse engineering some times, but it's the exception more than the rule and, at the end of the day, you … | |
![]() | Re: I share that feeling that Java is on its way down. It is starting to feel more and more like a legacy language. I think that much of it has to do with promises that never materialized. The promise of "portability through the JVM" is seriously undermined by a couple … ![]() |
Re: You need to include the "PL.h" file within your PosLin.cpp source file. The problem is most probably that your implementation of `SurTriPosRotAndQ` requires a complete type for `PosRotAndQ`, not just a forward declaration. So, if you include the PL.h file from the cpp file, you will have the complete declaration … | |
Re: If you look at the practical example section, where they show you how to visualize the garbace collector using that VisualGC tool, you can clearly see that the generational GC is what is being used in practice. The point really is that the "mark-and-sweep" process is the fundamental mechanism by … | |
Re: If you are going to be hacking away at the Linux kernel, you have to be prepared to deal with tons of specific data types. And that's not even a tiny fraction of all the "exotic" stuff you'll see in there. Kernel coding is a dark art, and lots of … | |
Re: I agree with the others that with a bit of effort and some good recovery tool, you can probably get back nearly all the data off of your drive. Because you only overwrote 1.4GB, it probably didn't touch much, except for some OS stuff. So, that means that probably all … | |
Re: You should definitely use Boost.Thread. (you can download and install libboost-all-dev: [CODE] $ sudo apt-get install libboost-all-dev [/CODE] Then, here are two simple examples. One with a [URL="http://programmingexamples.net/index.php?title=CPP/Boost/Threads"]global function[/URL] and one with a [URL="http://programmingexamples.net/index.php?title=CPP/Boost/ThreadsMember"]member function[/URL]. | |
Re: I don't really know why you'd want to install Android on a laptop, but I guess it's possible (with android-x86). I would recommend a proper desktop version of Linux instead, like some variant of Ubuntu for example. Generally, to make place for a Linux installation, you would go to Windows … | |
Re: > what's the equivelant of that in either PPC or x86_64 binary opcodes?? Are you asking us to compile this Python code? You can use a Python-to-C/C++ conversion tool, like Cython, and then compile it with a C/C++ compiler. If you specify PPC as target, you'll get the PPC machine … | |
Re: > well its not a homework question...it was in a paper I'm curious what you mean by that, what kind of paper? A research paper.... lol... that's an amusing thought, that a research paper would contain a basic computer science 101 question. > but i want expert opinion on it... … ![]() | |
Re: There is only one version of Windows that matters now, which is Windows 7. Everything else is either deprecated (old, unsupported, dangerous to use) or really terrible (Vista, or Windows 8). So, that's all there is to it. | |
Re: You need to add each source file to the project (through the Codeblock's menus) and build them all together. Actually, it will cause each source file to be compiled individually, and then linked together. If you want to gain a more complete understanding of this, you can read [my tutorial … | |
Re: The support for pixel / vertex shaders has nothing to do with the motherboard, it has to do with the graphics card (or its GPU, to be more precise). You need to find out which graphics card (or integrated graphics GPU) that your computer uses. Then, you can look up … | |
Re: The best way to represent a graph in C++ is using the [Boost Graph Library](http://www.boost.org/doc/libs/1_57_0/libs/graph/doc/), such as [using the adjacency-list](http://www.boost.org/doc/libs/1_57_0/libs/graph/doc/using_adjacency_list.html) class. The algorithms you are looking for are probably already implemented in the BGL, just look at the [table of contents](http://www.boost.org/doc/libs/1_57_0/libs/graph/doc/table_of_contents.html). |
The End.