2,898 Posted Topics

Member Avatar for Warrens80
Member Avatar for can-mohan

Like Moschops link says, the options are basically between using a zombie state or throwing from the constructor. The latter is the ideal solution, for an ideal world in which you can adopt exceptions wholesale for everything. Unfortunately, the real world is not very ideal, and therefore, the zombie state …

Member Avatar for can-mohan
0
393
Member Avatar for Dave Sinkula

Here is my two cents from taking a bit of time to skim through most of the major books on C++. **For Beginners** The best I can do to help you is convey hearsay about recent readers having said "I learn C++ using book X, and it was really good.", …

Member Avatar for shahidali6
11
10K
Member Avatar for Ancient Dragon

> But if the body receives consciousness in the same way that a cable box receives satellite signals A cable box receives satellite signals?!? Ok... Well, I guess he meant the way a high-gain antenna receives VHF/UHF signals. I must assume that he is very poorly informed about the way …

Member Avatar for 45ish
0
1K
Member Avatar for fernando.sawyer.98

Mac's are definitely very common among computer science or computer engineering students. I'm not sure they're really the best. I would recommend a PC laptop on which you install Linux for a dual boot with Windows. Windows is better than Mac for using the engineering software you might need for …

Member Avatar for Richard_25
0
253
Member Avatar for mike_2000_17

That's right! One day you might buy a car equipped with several autonomous driving features, maybe even door-to-door autonomy, and guess what? A part of me might be driving you around that day. I recently accepted an offer to join the autonomous driving systems team at Bosch's Research and Technology …

Member Avatar for <M/>
5
356
Member Avatar for mgold

> things like Weka and RapidMiner These seem (at first glance) like two very typical examples of the kinds of "tools" you often find for specific purposes (e.g., analytics). Weka is an academic project, probably written by students to try out specific algorithms, it's written in an academic language (Java), …

Member Avatar for thaifoodlover
0
346
Member Avatar for Tcll

> I'm used to seeing eular rather than euler It's neither *eular* nor *euler*, it's **Euler**, as in, **Leonhard Euler**, one of the greatest mathematicians to ever walk this Earth. You can at least spell his name correctly, with a capital letter, he earned it. The greatest tragedy is probably …

Member Avatar for Tcll
0
501
Member Avatar for Slavi

[PacMan has invaded the streets!!](https://support.google.com/maps/answer/6178227?hl=en)

Member Avatar for Slavi
0
494
Member Avatar for iamthwee

I've never looked into this language before you mentioned it. It has some interesting elements. I'm glad you got me to look into it. First, I love the built-in concurrency support in Go. It has Ken Thompson's finger-prints all over it. It's basically structured like Unix pipes, which are awesome. …

Member Avatar for vegaseat
1
845
Member Avatar for nitin1

> this downcast is invalid and will throw an exception. Actually, it won't. Invalid downcasts only throw a `std::bad_cast` if you use references (because you can't have a null reference). If you are casting to a pointer type, such as `Derived*`, the resulting pointer will be null (`nullptr`) and no …

Member Avatar for mike_2000_17
0
5K
Member Avatar for mmcdonald

Generally speaking, the component you are looking for is called a "linear actuator". It is most commonly using pneumatics (compressed air) to get their power, as those shown in the second link by pritaeas. However, you have to understand that with such a system, you need a source of compressed …

Member Avatar for HiHe
0
381
Member Avatar for Jack_11

Has Lisp ever really been anything more than an academic language with very little real-life applicability? I know that some software use Lisp-based syntax for their scripting language, and that there are tons of dialects of Lisp, but that's mainly because it's super easy to parse (i.e., people who like …

Member Avatar for Schol-R-LEA
0
374
Member Avatar for deceptikon

Write an example of object-oriented programming in C, including dynamic dispatching mechanisms and run-time type identification. This is something people do often in C, and always in a clumsy, ad-hoc way.

Member Avatar for vegaseat
3
749
Member Avatar for Slavi

As a 21st century viking, I'm happy that they stopped naming their distributions after those false gods of the puny Romans. May Freja bring fertility to this distribution!

Member Avatar for Slavi
0
263
Member Avatar for Gift_3

I agree that the definition is kind of fuzzy here. Broadly speaking, "engineer" means that you can design solutions to complex problems. Would a "good programmer" mean someone who can't do that, or can only do that for simple problems? Then, what makes him/her "good"? And then, there's the problem …

Member Avatar for mike_2000_17
0
294
Member Avatar for Sarkurd

This is a bit tricky to explain, because it involves a number of implementation details about `std::vector`. It is clearer if we expand the main code a bit, with some additional print-outs: std::vector <Foo> vec; std::cout << " Adding..." << std::endl; vec.push_back(Foo(15)); std::cout << " Adding..." << std::endl; vec.push_back(Foo(12)); std::cout …

Member Avatar for Sarkurd
0
284
Member Avatar for Lutina

I think you have many misconceptions about the compilation and linking process of C/C++ sources. I suggest you read [my comprehensive tutorial](https://www.daniweb.com/software-development/cpp/tutorials/466177/understanding-c-from-source-to-binaries) on the subject. Like NathanOliver said, there is (almost) no reason to ever `#include` cpp files. Each cpp file should be compiled separately (they each should have the …

Member Avatar for mike_2000_17
0
276
Member Avatar for mike_2000_17

# Introduction # A recurring problem many newcomers face when tackling C++ is the compilation process, from sources to binaries. This tutorial will detail that process. It will be especially useful for people only familiar with higher-level languages (if any), but veterans of one or more native languages (C, Fortran, …

Member Avatar for Lutina
15
8K
Member Avatar for vjcagay

The most "powerful" top to bottom combination of languages for desktop / server applications seems to be C / C++ / Python. That's my two cents.

Member Avatar for vegaseat
-1
4K
Member Avatar for d8m9

This is funny because there was just a guy presenting a fuzzing tool for testing Clang (the C / C++ / Obj-C compiler), check it out [here](http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-January/040705.html). This is really cool stuff, especially the [afl-fuzz](http://lcamtuf.coredump.cx/afl/) tool. > I want to avoid to test some program which is widely used or …

Member Avatar for rubberman
0
527
Member Avatar for Warrens80

All my wisdom teeth were horizontal and had to be removed even though they weren't sticking out yet. I didn't get general anesthesia (the dentist didn't even bring that up as an option, I guess local anesthesia was enough). The gum had to be cut open, the teeth had to …

Member Avatar for webecedarian
0
223
Member Avatar for RikTelner

I don't think anyone really does 3d graphics in C#, or at least, I don't think anyone should. As far as I know, Unity is written in C and C++. It's only the high-level bindings that are in C#. C# being a Microsoft-only language (in practice), I would imagine that …

Member Avatar for RikTelner
0
2K
Member Avatar for Warrens80

I would presume that your laptop is fairly old, right? Like from the time that XP still came pre-installed on new computers. If that's the case, I'm not too optimistic about getting a newer version of Windows (which would be Windows 7, as the others suck) to work smoothly on …

Member Avatar for vegaseat
0
328
Member Avatar for ddanbe

It cannot be incorporated into the command prompt because of batch file scripts that need to remain compatible. Basically, if there are batch files that use variable names that are also Unix command names, then those scripts would be broken. Then, in order to be relevant as a Unix-like terminal, …

Member Avatar for rubberman
0
336
Member Avatar for RikTelner

If you are using Linux, you can easily wipe out an HDD by using the `dd` command, as described [here](http://how-to.wikia.com/wiki/How_to_wipe_a_hard_drive_clean_in_Linux). **Make sure to use the correct device**. In those instructions, they wipe out the `/dev/sda` hard-drive, but this will be different for you. You can use the instructions on [this …

Member Avatar for RikTelner
0
483
Member Avatar for RikTelner

This looks like a pretty serious problem. Are you sure that you were able to boot into that LiveCD before? Not being able to boot with a LiveCD that you once was able to boot with means that there is something seriously wrong with the hardware. The fact that you …

Member Avatar for RikTelner
0
698
Member Avatar for happygeek

I second the others, I would nominate [rubberman](http://www.daniweb.com/members/715612/rubberman) for sure. And also, the "eternally awesome" [deceptikon](http://www.daniweb.com/members/937956/deceptikon) (or is it "eternally confuzzled".. I'm confuzed.. wink wink). And, here are a few common encounters in the C++ forum for a long time: Labdabeta, Moschops, L7Sqr, .. that's all I can think of …

Member Avatar for XP78USER
0
612
Member Avatar for happygeek

I think there is at least some hope. For example, there are some very serious people who have worked for years to come up with a solution that allows you to cope with the end-of-life of Win Server 2003 without any security risks, they put up [clear and detailed instructions …

Member Avatar for Slavi
2
585
Member Avatar for rubberman

>Editing of posts works fine? As always, you can only edit your post for up to 30 minutes after posting. Wrong, at least, not right now. Editing of posts does not work (no button appears for it, unless it's now somewhere else that I can't find), and it's not a …

Member Avatar for Warrens80
0
275
Member Avatar for RikTelner

I know that VirtualBox has "guest additions" that will provide 3D graphics (or "3D acceleration" in old-school terminology). It's all documented [here](https://www.virtualbox.org/manual/ch04.html). Pay attention to the warning that says that you need to be in "Safe Mode" in your Windows guest when you're installing the graphics guest additions. Obviously, I …

Member Avatar for RikTelner
0
257
Member Avatar for Brandon_7

We cannot decide for you, because we don't know what you want or what would make you happy. Rubberman put it very well, computer science is science, and computer engineering is engineering. Don't expect a computer science degree to make you a proficient programmer. There are certainly some people that …

Member Avatar for rubberman
0
554
Member Avatar for iamthwee

Download and install the [recommended driver](http://www.nvidia.ca/Download/driverResults.aspx/73666/en-us), and blacklist nouveau, as rubberman said. And, also as rubberman said, **do not bother** with the drivers suggested by the package manager (aka "additional drivers").

Member Avatar for mike_2000_17
0
373
Member Avatar for Courtney_2

Are you sure you plugged in all the connections of the power supply? Make sure that all the places where the old power supply connected to are also connected now. The reason I'm saying this is that usually the fans use separate power feeds from the electronic components (CPU, Mobo, …

Member Avatar for mreza
0
366
Member Avatar for ilovec++

>>like int occupies 2 bytes Wow, how old is your computer? Usually, on a 32bit system, an int occupies 4 bytes (and 8 bytes on a 64bit system). For an int to occupy 2 bytes, your system must be pretty old (or very special). >>How much memory does the reference …

Member Avatar for yoavip
0
566
Member Avatar for Thomas_25

For linked-lists, the merge-sort algorithm is pretty much the only decent choice. For arrays, things are a lot more subtle and interesting, but not for linked-lists, it's merge-sort that's just the clear winner over any other option (although it could be that insertion-sort is better when the list is very …

Member Avatar for rubberman
0
2K
Member Avatar for RikTelner

You are a very valuable member RikTelner, and you certainly deserve that tag. There is no need to be an expert on everything (or anything, for that matter) to be respected and provide valuable contributions. Most discussions here involve one or a few people needing help on something they don't …

Member Avatar for diafol
0
327
Member Avatar for DaveAmour

The same for me, I see the red and blue pills... not gray. I think the effect is stronger when you take your focus off the images (so they get blurry).

Member Avatar for advent_geek
1
405
Member Avatar for deceptikon

That could be pretty cool. I've considered doing something like that myself too. Not sure about the live Q&A part, it could be hard to gather a sufficient audience for that. Maybe you can try it in two parts: a video demonstration with an invitation to ask questions, and then …

Member Avatar for deceptikon
3
176
Member Avatar for Thomas_25

To add an element to a `vector`, you need to use the `push_back` function. The error comes from the fact that when you are accessing `v[0]` when the vector is empty, you will get an error because there is nothing to access. Your insert function could look like that: template …

Member Avatar for Thomas_25
0
156
Member Avatar for James19142

This is a very weird error. I suspect that it's a bug in MSVC. Delegating constructors is a pretty new feature for MSVC. AFAIK, there isn't much experience with it yet, i.e., people, like me, don't use delegating constructors yet because we have to cater to the lowest common denominator …

Member Avatar for James19142
0
649
Member Avatar for necrovore

I would guess that the errors you got prior to this one prevented the "podofo.lib" library from getting built correctly, which is why it wasn't found later on when it was needed (by the "CreationTest" program). When it comes to dealing with compilation or linking errors, the rule is to …

Member Avatar for necrovore
0
2K
Member Avatar for Suzie999

Really? You had the same problem as the OP? You mean the problem that is triggered when someone sends you a message on your shoutbox.... And your shoutbox is currently empty, because nobody ever sent you a message... I guess being a troll is a lonely affair.

Member Avatar for pritaeas
0
278
Member Avatar for Ralph_3

> Is there a result that states how many edges I need to generate before the graph becomes connected? Well... one hint to this might be found in the definition of a [spanning tree](http://en.wikipedia.org/wiki/Spanning_tree). The only question remaining is, how many edges does a tree with N vertices have? (this …

Member Avatar for Ralph_3
0
1K
Member Avatar for humorousone

> Every bug you find is the last one. I've been finding my last bug every week for the past 10 years... yep, that's how good I am. I found my last bug ever last week, now my code is flawless. ;) > I would have to say engineer. I …

Member Avatar for ZZucker
0
501
Member Avatar for Reverend Jim

How shocking... (roll eyes) I remember how Microsoft sold secureboot to the world by promising that it would always be possible to switch it off, and thus, not locking owners out of the hardware they paid for. How long did that promise last? For a few years and for the …

Member Avatar for se25
0
426
Member Avatar for HuePig

These are hexadecimal values, not characters. If you try to read them as characters, you will end up with the character array containing something like this: c[16] = {'4', 'C', '6', '1', ' ', '6', ..., 'C'} You need to read them as hexadecimal numbers. Here is how you do …

Member Avatar for マーズ maazu
0
249
Member Avatar for CodeWarrior14

I believe that the problem is that your lines 35-36: sumxto2 = pow(sumx2, 2); sumyto2 = pow(sumy2, 2); should be as follows: sumxto2 = pow(sumx, 2); sumyto2 = pow(sumy, 2); note the use of `sumx` and `sumy` instead of the `sumx2` and `sumy2`.

Member Avatar for CodeWarrior14
0
440
Member Avatar for RikTelner

Windows is programmed in C and C++. Its native APIs (win32) are in C. Most professional Windows software is written in C++ (like Visual Studio, MS Office, Adobe products, etc..). I don't understand what you mean by saying that you need C# to write native applications for Windows. C# is …

Member Avatar for iamthwee
0
790
Member Avatar for pww71

I command you for your enthusiasm with this project of yours. But Schol-R-LEA is right, you are getting dangerously close to spamming with these posts. I deleted the other duplicate posts you made. About your project.... I'm afraid you have a lot to learn. It pains me to say that …

Member Avatar for mike_2000_17
0
260

The End.