2,898 Posted Topics

Member Avatar for Curious Gorge

This line declares a variable called `pNf` which is an auto-pointer to a `Notification` object, and it is initialized to `_queue.waitDequeueNotification`. The `AutoPtr` is a [class template](http://www.learncpp.com/cpp-tutorial/143-template-classes/). And the `Notification` class is it's template argument, making `AutoPtr<Notification>` an auto-pointer to a notification object. I believe that it is essentially equivalent …

Member Avatar for Curious Gorge
0
311
Member Avatar for Learner010

> it should print 10(1+2+3+0+1+2+0+1+0) So, you want to add together the first three digits of each row. Right? I say that because NathanOliver's code assumes that you want to interpret the first three digits as one number, and add the three (for each row) together, i.e., it should print …

Member Avatar for NathanOliver
0
384
Member Avatar for RikTelner

Reverend Jim thought that you were talking about 4K as in 4 kilobytes (or 4KB), and by that measure, the size of a 4KB file is, well, `4 * 1024` bytes. He simply did not realize you were talking about that new ultra-high-definition format for video and televisions that is …

Member Avatar for Ketsuekiame
0
242
Member Avatar for tapananand

If you print out all the class sizes, things will become a bit clearer. If I run the following: #include<iostream> using namespace std; class Base {}; class D1 : public Base {}; class D2 : virtual public Base {}; class DD : public D1, public D2 {}; int main() { …

Member Avatar for mike_2000_17
0
1K
Member Avatar for Avishek_1

Here is where the logic is wrong: "since the default is only and only executed when no case matches" That's not true. **If** no other case matches, **then** the switch will jump to the default case. It's an "if-then" rule, not a "[if-and-only-if](http://en.wikipedia.org/wiki/If_and_only_if)" rule. The fact that no other case …

Member Avatar for jwenting
0
327
Member Avatar for bayosyntax

Since robotic motion planning is, generally-speaking, the topic of my PhD thesis, I can tell you quite a bit about this, probably far more than you really want to hear. I'll just try to give you a quick overview, with some key terms and places to start looking. If you …

Member Avatar for mike_2000_17
0
231
Member Avatar for Vasthor

We need more detail. You say you are using a custom version of shared-ptr, and the error seems to be in that custom class. So, we need to see that code, otherwise there is really no way to tell where the error might come from.

Member Avatar for mike_2000_17
0
911
Member Avatar for Vasthor

You cannot do a forward declaration of a class outside of its namespace, you need to do this: namespace std { template <class> struct hash; } I think that will solve it. Also, I'm pretty sure you need the `template <>` on the definition of the hash's `operator()` for your …

Member Avatar for mike_2000_17
0
1K
Member Avatar for FireSBurnsmuP

This is indeed an interesting discussion. There's a lot of talk about "speed" here, but that is rather vague and inaccurate. What makes RAM "fast" is the low [CAS latency](http://en.wikipedia.org/wiki/CAS_latency). It is not so much a matter of bandwidth (bytes per second), it is a matter of response time or …

Member Avatar for Hiroshe
0
634
Member Avatar for happygeek

Given that the biggest vulnerability in any network is the human beings using it (e.g., not protecting physical access to key machines, leaving for a break and leaving the computer logged in, using simple passwords or none at all, visiting dubious websites while at work, etc..), I would fear that …

Member Avatar for Hiroshe
2
427
Member Avatar for HunainHafeez

> what he is really doing and how can i protect my account ? and what methods he's using ? You should ask him. But I have a feeling he is imaginary... and that you're just fishing for some tips on how to hack people's accounts.

Member Avatar for Rebekahcorlin
-4
408
Member Avatar for omnik123

The old town of Quebec city: ![f949bde2420103f3d43e1defb39af51b](/attachments/large/3/f949bde2420103f3d43e1defb39af51b.jpg "f949bde2420103f3d43e1defb39af51b")

Member Avatar for Agilemind
0
752
Member Avatar for sami9356

@sami9356: We don't appreciate it much when people simply copy-paste their assignment questions to this forum. You are unlikely to simply get an answer. The answer to your question can be found within some explanations of how to correctly and efficiently implement an assignment operator, here are a few tutorials …

Member Avatar for mike_2000_17
0
205
Member Avatar for moaz.amin.37

The mechanism for calling virtual function is, technically-speaking, unspecified or implementation-defined, meaning that there is not actual guarantee about how it is actually done. However, it is almost always accomplished the same way, via a virtual table. So, for each class that defines or inherits virtual functions, the compiler will …

Member Avatar for mike_2000_17
0
292
Member Avatar for nitin1

The second option seems pretty good. I think that you will be perfectly happy with integrated graphics, like Intel HD Graphics that come with their boards. The only thing that is a little weak with option 2 is the amount of RAM, I think that 4GB of RAM is a …

Member Avatar for Hiroshe
0
352
Member Avatar for Reverend Jim

Contrary to popular belief, the debate between Christopher Columbus and his peers was not about whether the Earth was round or flat, they all agreed it was round, but they disagreed on the size of it and the size of the Eurasia. The consensus on both sizes of the Earth …

Member Avatar for Reverend Jim
0
433
Member Avatar for khakilang

If you do a hard shutdown (by holding the power button of the computer until it shuts down), does it still turn back on by itself? If it does, then it must be some sort of hardware issue. Maybe the power-button was wired up wrong?

Member Avatar for khakilang
0
270
Member Avatar for sheelap

OOP is a programming paradigm, which is to say, it's a way to reason about the code, i.e., the way you see / understand the code. It's a kind of philosophy, if you want. In very general terms, it's about looking at the overall application as a collection of objects, …

Member Avatar for mike_2000_17
0
207
Member Avatar for cambalinho

How do you know that this is not a delay created by your email server? In the old days, it was common for some emails server to be slow or have a naturally delay (and 1 hour wasn't uncommon). AFAIK, this is no longer a common issue.

Member Avatar for blackmiau
0
365
Member Avatar for nitin1

When it comes to laptops, I have always found that Toshiba or Acer are pretty safe bets. I think HP is OK too. I've never trusted the quality of Lenovo, Sony or Dell, for laptops. That's just my 2 cents. Btw, your specs are very close to what I have …

Member Avatar for blackmiau
0
444
Member Avatar for iAssistant

It's snowing a bit (probably about 5cm by the end of the day), and it's pretty cold, about -20 C (about -5 F), but it feels much colder with the high winds and high humidity.

Member Avatar for Stuugie
0
4K
Member Avatar for Mr.UNOwen

Moschops is mostly correct. There are standard guarantees about the memory layout of the data members of a class, but it has to meet a number of requirements / restrictions. In standard terminology, this kind of class is called a *standard-layout* class, and it has the following requirements: 1. It …

Member Avatar for Mr.UNOwen
0
180
Member Avatar for dw85745

The main thing that determines longevity is inertia. The only reason people still use Fortran or Cobol is because of inertia. To some extent, C as well, although it is often a practical (minimal) language for small tasks. Therefore, the languages that are likely to live for at least a …

Member Avatar for Reverend Jim
0
374
Member Avatar for RikTelner

There must be a purpose to what you want to do, otherwise, there can be infintely many ways to partition countries or the Earth. There are natural partitions (tectonic plates, geology, climate, basins (watersheds), etc.). There are geo-political partitions (country, province / state, county / parish / district, municipalities, etc.). …

Member Avatar for jwenting
0
233
Member Avatar for napninjanx

I'm not sure I understand what you mean. I guess you are asking about how to make a game that has the same level of graphics quality from a 10-year-old game, but on today's hardware? It is certainly possible. To understand this, you have to know that there are two …

Member Avatar for napninjanx
0
252
Member Avatar for khineyamin.thu.9

Use [VLC](http://www.videolan.org/vlc/index.html). Windows media player is a joke.

Member Avatar for rubberman
0
322
Member Avatar for anupam_smart
Member Avatar for hpmanik2014

The first thing to try is the install additional drivers. To do this, open up the **Software & Updates** tool from the Dash and click the **Additional Drivers** tab. Follow the on-screen prompts to check for, then enable, any **proprietary drivers** (not open source) available for your system. This is …

Member Avatar for mike_2000_17
0
279
Member Avatar for peter_budo

I agree that this issue is annoying. There are similar issues with code blocks inside of quotes. I think the markdown renderer could use a bit of re-working.

Member Avatar for Dani
3
236
Member Avatar for oanahmed

> What is intelligence anyway,.. Technically, many systems are intelligent to a degree, and often in very narrow bands. That is clearly one of the core questions that people have been trying to answer, and there is definitely no clear line separating what we would recognize as real "intelligence" and …

Member Avatar for oanahmed
-1
423
Member Avatar for glamiex

Are you sure that you are placing the studentName.txt file in the same folder as the .exe file that is generated by the compiler? I suspect that the file you think it's using is not the one that it is actually using. When you load `"studentName.txt"`, it will open the …

Member Avatar for wrathness
0
183
Member Avatar for Mr.UNOwen

When you have **column-major** ordering, that matrix would look like this in memory: AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD When you have **row-major** ordering, that matrix would look like this in memory: AA BA CA DA AB BB CB DB …

Member Avatar for Mr.UNOwen
0
2K
Member Avatar for Jsplinter

There are mainly two easy ways to "parallelize" the operations in a for-loop like this. One option is to use SSE(2-3) instruction sets. SSE instructions sets can basically perform multiple (4) floating point operations at once (in one instruction). This is something that the compiler can do automatically. If you …

Member Avatar for mike_2000_17
0
205
Member Avatar for bejfake

What is really important is to resize by an amount that is proportional to the current amout in the array. Typical factors vary from 1.25 to 2. The reason why it is important to use a growth factor like that is because it makes the cost of allocation (and copying) …

Member Avatar for rubberman
0
1K
Member Avatar for asif49

I agree with Dani and carl.potak in that a really good fit might be the middle group between client / management and the professionals (programmers / engineers). This could be anywhere from project manager to sales representative. You might not see yourself doing programming (software engineering, etc.) work, but with …

Member Avatar for iamthwee
0
630
Member Avatar for anestistsoukalis

An error like "too many levels of symbolic links" means that you must have a recursive (i.e., circular) set of symlinks. In other words, you must have created a symlink (maybe for `.bashrc` or `/bin/bash`) which directly or indirectly refers back to itself. When that happens, the OS follows the …

Member Avatar for Gribouillis
0
2K
Member Avatar for Curious Gorge

This is indeed something of a problem. It is always difficult to jump into a new and large code-base. You should concentrate on any available overview documentation (e.g., explaining how it works or is structured), tutorials (e.g., showing how to make mods), and reference documentation (e.g., class references). If you …

Member Avatar for L7Sqr
0
199
Member Avatar for Sarkurd

The problem is that your `operator==` function is defined in the header, which means that it will be compiled for each cpp file that includes it, leading to multiple definition errors (see [One Definition Rule](http://en.wikipedia.org/wiki/One_Definition_Rule)). What you need to do is declare the function in the header and implement it …

Member Avatar for Sarkurd
0
384
Member Avatar for basil60
Member Avatar for richieking
0
2K
Member Avatar for RikTelner

[System76](https://www.system76.com/) is another well-known company that sells computers with Linux pre-installed. Burning the image to a DVD is not a particularly good option, in my opinion. Booting up from a DVD is very slow. You should put it on a USB stick instead. This is going to be faster when …

Member Avatar for dave.mcdonald.18
0
536
Member Avatar for Labdabeta

The problem is that you are looking in the wrong places. The reason why you cannot execute files on a USB is because the automatic mounting of USB drives in Ubuntu is somehow set to read-write permissions, but no execute permissions. Basically, the mount permissions are a mask that apply …

Member Avatar for mike_2000_17
0
1K
Member Avatar for Cygnus333

I second rubberman on his suggestion. I use ffmpeg whenever I need to do any kind of video / transcoding work, it's phenomenal. But I would just like to add that technically ffmpeg is deprecated in favor of "avconv" from the [Libav project](http://en.wikipedia.org/wiki/Libav). avconv is technically an almost drop-in replacement …

Member Avatar for SaintAce
0
643
Member Avatar for pars99

Yes, as AD says, you have to specify the output name with the `-o` option. Clang uses all the same options as GCC, as much as possible. So, if you need instructions on using clang and you can't find what you need, just look for instructions on using GCC, they …

Member Avatar for pars99
0
162
Member Avatar for codey666

The memory leak is the least of your worries. This function is riddled with undefined behavior, memory leaks, heap corruption, memory corruption, and general mayhem. I'm surprised that it makes it as far as completing one iteration. 1) When you allocate a single object with the `new`, you need to …

Member Avatar for codey666
0
311
Member Avatar for ponnan

I agree with rubberman that you don't really need to know assembly these days for most tasks. There are still some dark corners in which you will find assembly code, which mostly include very low-level pieces of things like operating systems or compilers, very critical functions that need nano-optimization (i.e., …

Member Avatar for rubberman
0
433
Member Avatar for justsomeuser

Hello and welcome. (Gruss Gott und willkommen!) I hope to see you around in the C++ forum.

Member Avatar for happygeek
0
157
Member Avatar for swissknife007

Dell is alright for desktop computers, they have good bargains and you can hand pick it all. However, Toshiba is far superior on laptops. They build really solid machines, and their consumer service is great. At least, that's been my experience, a grain of salt.

Member Avatar for akshay326893
-1
2K
Member Avatar for Rootz

The problem is that you are trying to sort `BankAccount` objects, but that class does not have a less-than comparison operator. The standard sort algorithm (unless otherwise specified) will use the less-than `<` operator to order to values. You need to overload that operator to be able to use the …

Member Avatar for Rootz
0
841
Member Avatar for RikTelner

> So Linux, is like kind of worktable and all the applications are tools? Yes, like any other operating system. The main difference with Linux is that it is far more deeply modular. Except for the kernel itself, which is one monolithic block (but modules can be added to it), …

Member Avatar for RikTelner
0
230
Member Avatar for ashley.vanhoesen.7

Everything is fine except for the part where you test the palindrome. You need to break out of the loop as soon as you find a mismatching character. Currently, the way it is, you are going to loop until the last character, and the bool `isPalindrome` will only reflect the …

Member Avatar for mike_2000_17
0
684

The End.