2,898 Posted Topics

Member Avatar for Leo G

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 …

Member Avatar for Leo G
0
437
Member Avatar for tgreiner

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

Member Avatar for Schol-R-LEA
0
10K
Member Avatar for ddanbe

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 …

Member Avatar for mike_2000_17
0
363
Member Avatar for lewashby

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 …

Member Avatar for mike_2000_17
0
205
Member Avatar for ChrisP-C++

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

Member Avatar for mike_2000_17
0
376
Member Avatar for clhamon

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 …

Member Avatar for almostbob
0
350
Member Avatar for can-mohan

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

Member Avatar for can-mohan
0
428
Member Avatar for Tycellent

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

Member Avatar for Tycellent
0
335
Member Avatar for DS9596

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

Member Avatar for DS9596
0
1K
Member Avatar for iamthwee

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 …

Member Avatar for iamthwee
1
226
Member Avatar for matrixdevuk

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

Member Avatar for diafol
0
419
Member Avatar for nitin1

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

Member Avatar for mridul.ahuja
0
278
Member Avatar for Basil_1

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.

Member Avatar for <M/>
0
297
Member Avatar for <M/>

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 …

Member Avatar for iamthwee
0
500
Member Avatar for Wagaana

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 …

Member Avatar for Wagaana
0
121
Member Avatar for Sanjok

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 …

Member Avatar for Sanjok
0
332
Member Avatar for Jazmine_1

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.

Member Avatar for Jazmine_1
0
310
Member Avatar for Neon_1

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 …

Member Avatar for mike_2000_17
0
1K
Member Avatar for bythescruff

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 …

Member Avatar for mike_2000_17
0
255
Member Avatar for Shamar_1

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 …

Member Avatar for David W
-2
172
Member Avatar for XP78USER

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

Member Avatar for mike_2000_17
-2
139
Member Avatar for mike_2000_17

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 …

Member Avatar for Dani
0
341
Member Avatar for Reverend Jim
Member Avatar for mike_2000_17

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 …

Member Avatar for NathanOliver
7
2K
Member Avatar for senait.kifle.127

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 …

Member Avatar for mike_2000_17
0
235
Member Avatar for DavidB

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 …

Member Avatar for iamthwee
0
390
Member Avatar for pritaeas
Member Avatar for diafol
4
852
Member Avatar for lewashby

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

Member Avatar for mike_2000_17
0
434
Member Avatar for tom.lynd.39

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 …

Member Avatar for mike_2000_17
0
168
Member Avatar for JOSheaIV

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 …

Member Avatar for JOSheaIV
0
149
Member Avatar for VengefulToast

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

Member Avatar for mike_2000_17
0
291
Member Avatar for castajiz_2

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 …

Member Avatar for diafol
3
684
Member Avatar for happygeek
Member Avatar for diafol

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 …

Member Avatar for joseCRJ
1
548
Member Avatar for Sphinx'LostNose

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 …

Member Avatar for mike_2000_17
0
282
Member Avatar for fmaneiras

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 …

Member Avatar for fmaneiras
0
115
Member Avatar for keshavbhusal1

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 …

Member Avatar for mike_2000_17
0
111
Member Avatar for iamthwee
Re: Java

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 …

Member Avatar for iamthwee
0
494
Member Avatar for cypherscouter13

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 …

Member Avatar for cypherscouter13
0
443
Member Avatar for Compton11

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 …

Member Avatar for mike_2000_17
0
221
Member Avatar for anumash

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 …

Member Avatar for mike_2000_17
0
254
Member Avatar for DeanMSands3

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 …

Member Avatar for rubberman
0
239
Member Avatar for ankit,joy

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

Member Avatar for sumitlubal_1
0
234
Member Avatar for muhammad_74

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 …

Member Avatar for muhammad_74
0
374
Member Avatar for Tcll

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

Member Avatar for Tcll
0
416
Member Avatar for Builder_1

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

Member Avatar for iamthwee
0
164
Member Avatar for muhammad_74

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.

Member Avatar for muhammad_74
0
208
Member Avatar for ztdep

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 …

Member Avatar for mike_2000_17
0
150
Member Avatar for muhammad_74

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 …

Member Avatar for rubberman
0
335
Member Avatar for abdelfetah.laouzai

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

Member Avatar for mike_2000_17
0
119

The End.