2,898 Posted Topics

Member Avatar for dancks

Read the error report: ... in explosionhandler::registerexplosion (this=0x0, ... Obviously, the "this" pointer is NULL, which means the error is in the code from which this function was called. You must post that code if you want us to help you find the error. As for the bug with posting …

Member Avatar for mike_2000_17
0
260
Member Avatar for Lostelf

With my moderator hat on, I say: Ignore Rash's post, he doesn't have the slightest clue what he's talking about, almost everything he said is wrong and misguided. Of course, you are free to use your code for personal projects or assignment submissions. And you still own copyrights to your …

Member Avatar for rithish
0
381
Member Avatar for capton

MBR is an area at the very beginning of the hard drive. When you start the computer, the Bios (which is a little hardware program on the motherboard) looks for the hard drive (and other bootable devices) and if it finds a hard-drive, it starts running the code present in …

Member Avatar for mike_2000_17
1
353
Member Avatar for totalwar235

You should specify what country you are from, and where you plan to study. This is something that can vary tremendously depending on the country and university system. If in Canada, merit scholarships for graduate studies are plentiful which leads to more than half graduate students (or more) (of my …

Member Avatar for jenni01
0
376
Member Avatar for DeeperShade

To clarify, if I understand the process, you have normals for all faces and then you need to generate a normal for each vertex, presumably as the average of the normals of the faces to which the vertex belongs (one vertex connects multiple faces). I don't think there is any …

Member Avatar for DeeperShade
0
360
Member Avatar for triumphost

How useful is assembly? That's hard to say. Nowadays, it would be madness to write a large / complete application in assembly. As far as I know, when it comes to *writing* assembly code, the only areas of application are in high-performance, low-level, and/or resource-restricted environments. I'm talking things like …

Member Avatar for DeanMSands3
0
164
Member Avatar for capre001
Member Avatar for osiron

With my moderator hat on, I say: Ignore Rash's post, he doesn't have the slightest clue what he's talking about, almost everything he said is wrong and misguided. Of course, you are free to use your code for personal projects or assignment submissions. And you still own copyrights to your …

Member Avatar for osiron
0
180
Member Avatar for MasterHacker110

> In your opinion what is a better language. C or C++. It is highly dependent on what you do. C can certainly be simpler and hassle-free when doing some simple tasks (or low-level tasks). But C rapidly becomes difficult to manage on larger applications. I love software engineering, and …

Member Avatar for MasterHacker110
0
3K
Member Avatar for complete
Re: MVC

> What is MVC really? MVC is really not that complicated. It just means that you make sure to clearly separate the three main problems: how you store and arrange the data; how you present that data; and, how you control it. This is because you never know when you …

Member Avatar for princysharma90
0
387
Member Avatar for Ancient Dragon

It's a problem with the Windows bootloader (or bios configuration). Wubi only adds an entry to the Windows bootloader. I have a USB wireless mouse/keyboard and never had any problems with using it in the Windows bootloader (or in Grub2 after that). So, a USB keyboard should definitely work, check …

Member Avatar for elhijodelpeje
1
166
Member Avatar for myk45

> However, my question is, how is information about these variables stored in the binary, such that memory is allocated on the stack and the data segment for these variables? Of course, this is highly dependent on the platform, so I can only explain in generic terms. The executable file …

Member Avatar for myk45
0
300
Member Avatar for Rouf mir

Use the standard adaptor: [`std::priority_queue`](http://www.cplusplus.com/reference/stl/priority_queue/) Or, use the standard heap-functions: [`std::make_heap`](http://www.cplusplus.com/reference/algorithm/make_heap/), [`std::push_heap`](http://www.cplusplus.com/reference/algorithm/push_heap/), [`std::pop_heap`](http://www.cplusplus.com/reference/algorithm/pop_heap/). Or, read up on the subject of [heaps](http://en.wikipedia.org/wiki/Heap_(data_structure)). Otherwise, we cannot just do it for you. You need to show some efforts in trying to solve this problem on your own.

Member Avatar for princysharma90
0
120
Member Avatar for mike_2000_17

Hi all! This is a simple piece of code that I wrote about a year ago, in response to a question on Daniweb. I decided to infuse it with some C++11 magic, which led to a pretty sweet code snippet, full of neat little techniques you might want to use, …

Member Avatar for mike_2000_17
3
1K
Member Avatar for godzab

If a function is declared `inline`, its definition (implementation) must appear in the header file. Here are three equivalent options: // in foo_header_option1.h #ifndef FOO_HEADER_OPTION1_H #define FOO_HEADER_OPTION1_H class Foo { private: int bar; public: int getBar() const { return bar; }; void setBar(int aBar) { bar = aBar; }; }; …

Member Avatar for mike_2000_17
0
194
Member Avatar for Vectorizm

Of course, you can easily generate one random key: char k1[2]; k1[0] = '1' + (rand() % 2); k1[1] = 'A' + (rand() % 3); then, you can easily check if it is occupied. If it corresponds to a 0 cell, then generate a new key until it corresponds to …

Member Avatar for Vectorizm
0
398
Member Avatar for triumphost

The camera in OpenGL (or any other 3D graphics code) is just the global transformation you do on the entire scene. It is not something that is attached to a model, nor anything that you can "get". Think of it this way, in the world, there is no difference between …

Member Avatar for mike_2000_17
0
146
Member Avatar for Dewey1040

The header files are certainly not needed once the compilation is over (nor are they needed in unix environments). Normally, the DLL file should be required in order for the executable to work (if the DLL is actually used by the executable). With Microsoft products, it works as follows (for …

Member Avatar for mike_2000_17
0
184
Member Avatar for Sendy Hipo

At line 106 of your last post, you need to allocate size for 1 more element than the current array-size. As so: Type* temp = new Type[arraySize + 1]; That's what caused the run-time error. Also, you should note that in your push-back function, you don't actually need to check …

Member Avatar for Sendy Hipo
0
961
Member Avatar for mike_2000_17

CERN has just announced that they have detected a new particle consistent with the predicted Higgs boson (a.k.a. "The God Particle"). This is huge! CERN has observed the particle tied to the field that gives everything mass! And its mass is at 125.3 GeV (just shy of 5-sigma confidence). This …

Member Avatar for DavidB
1
167
Member Avatar for Reverend Jim

No. It's not just you. I've seen the same thing, especially with movies. The volume ratio between background music and dialogs is getting higher and higher. I don't think you can even call it background music anymore. I don't know what it is that makes directors think that this is …

Member Avatar for VernonDozier
0
182
Member Avatar for TheBusDriver

> Is there any way to make A work without using new (that includes placement new)? Without using the placement new operator, NO. At least, not in any way that would have defined behavior for any class. > The code is more or less identical and I'm sure my overloaded …

Member Avatar for sepp2k
0
657
Member Avatar for napninjanx

To me, the image that the word "hacker" invokes in my mind is that of a kid who has an irrepressible need to pick his home radio appart to understand every detail of it and tweak it, or to use the remote and receiver from an old TV to try …

Member Avatar for firdousahmad
0
227
Member Avatar for MasterHacker110

Well, if the error is caused by the two lines that are commented out (66 and 68) then I am not surprised. Line 66 is for sure going to cause a seg-fault because the string encline is not yet big enough (say, at the first iteration) to have an element …

Member Avatar for MasterHacker110
0
2K
Member Avatar for mike_2000_17

Hi, I've been experiencing a weird bug in the editor (for a week or so). If I write a post, everything is fine and dandy until I start a block of code. From the first line of code that I write, and for every subsequent line of code after that, …

Member Avatar for Dani
1
563
Member Avatar for alpaba

Welcome to Daniweb! I'm actually one of the most active C++ experts around here. However, I, like most others here, do not do personal mentorship. Just ask questions on the forum and you will get answers. Ever heard the expression "it takes a village to raise a child", well think …

Member Avatar for anandagrawalseo
0
68
Member Avatar for WolfShield

If there are any scandinavians around, you'll like this medieval tech support (also with english sub-titles): http://www.youtube.com/watch?v=CQOf20Xrd1o And here's a joke: A pastor takes a stroll in the public market on a sunday afternoon. He sees a boy standing next to a wooden box, so he walks up, and sees …

Member Avatar for itzarun
0
1K
Member Avatar for triumphost

Your two functions in MyDetour.cpp must be declared with `extern "C"`, and you should probably also add `__stdcall` since that's the calling convention for OpenGL functions on DLLs (and essentially every other DLL that exists too).

Member Avatar for triumphost
0
761
Member Avatar for MasterHacker110

Qt is very easy to use and it is well-supported on all platforms (Linux, Mac and Windows) for doing GUI programming (and, of course, the KDE desktop environment is built with Qt, and I think a few others too). As for penetration testing, this has nothing to do with GUI …

Member Avatar for L7Sqr
0
209
Member Avatar for Chuckleluck

You can add all the paths that you want to the include-paths of the compiler (check your IDE or compiler documentation for how to do that). Then, you can include header files by name only, dropping the folder completely. Of course, this assumes that the header files don't have conflicting …

Member Avatar for mike_2000_17
0
16K
Member Avatar for Labdabeta

Lorem Ipsum for C++? That's odd. What exactly is there to fill? The point of a Lorem Ipsum (as I understand it) is that the content is of no concern (and thus, the randomly-generated latin-looking words), but only the formatting is important. In programming, that seems pretty inappropriate, mostly because …

Member Avatar for Labdabeta
0
2K
Member Avatar for rockerjhr

As sepp2k says, the problem is that the difference `x_1 - x_0` could be negative, but yet large in magnitude. So, the right condition is to use the absolute value of the difference, as so: while( fabs(x_1 - x_0) > pres ) or, equivalently, this or-expression: while( (x_1 - x_0 …

Member Avatar for mike_2000_17
0
1K
Member Avatar for SeaBook

Welcome to Daniweb! You might want to have a look at the [member rules](http://www.daniweb.com/community/rules), in particular: #Keep It Clear - **Do** post in full-sentence English #Keep It Pleasant - **Do not** post insults or personal attacks aimed at another member

Member Avatar for mike_2000_17
0
68
Member Avatar for anuran

This is far from being a simple problem, and this kind of problems are active areas of research in computer science (more specifically, in image processing and machine learning). A colleague of mine (PhD) worked on this for a while, until she gave up and changed her supervisor. I think …

Member Avatar for rubberman
0
502
Member Avatar for DeeperShade

First of all, welcome to Daniweb! Second, your code is not remotely as horrible as you say it is (I've seen a lot worse). It is pretty good overall, with a few issues to solve. Ok, so, on to the issues: 1) You have a memory leak in the load …

Member Avatar for DeeperShade
1
270
Member Avatar for cdsmumbaii

We will not do your homework for you. You must show that you are really trying to solve this problem on your own, that you have code to show for, and that you are stumped on a specific problem. We can help you solve specific problems or explaining certain things …

Member Avatar for mike_2000_17
0
103
Member Avatar for triumphost

> Full support for object-oriented programming didn't come around until .NET, and then only for .NET style objects and classes. Well, that's not true at all. On the Windows side, there were many frameworks before .NET which could and still can export classes. In particular, COM objects (and their derivatives, …

Member Avatar for mike_2000_17
0
2K
Member Avatar for grh1107

There is probably a way to make it work as a function within the function. However, this is really unusual and unnecessary. The proper solution, seconding NathanOliver on this, is to make the recursive function a private member function of your class. Also, having those static local variables like that …

Member Avatar for mike_2000_17
0
3K
Member Avatar for sparsh610

One basic algorithm is basically just reversing the next-pointer between two adjacent nodes while traversing the list, and at the end, you swap the head and tail pointers. To do this, you need to keep three node pointers, for three consecutive nodes (the last may be NULL). If you have …

Member Avatar for sethlahaul
0
172
Member Avatar for kris222

I think deceptikon listed all the "good" reasons, but there are also "bad" reasons: - A new programming language can be an attractive sale-point to promote the adoption of some new framework (e.g., .NET or JVM). - A programming language can be a good tool for vendor-lock-in strategies when certain …

Member Avatar for iamthwee
0
127
Member Avatar for Danja

(posting this while trying to repress the urge to criticize the style and design) Line 174 is wrong. The condition on the if-statement should be with `&&` not with or. The whole logic of the sorting is wrong. Lines 206-207 assume that the value at index `i` is not yet …

Member Avatar for hkwhitten
0
1K
Member Avatar for Ancient Dragon

It's the ghost of cscgal still haunting the forums... hooouuuu... No, I think it is just that the last-poster's name is not linked to the user profiles (as it doesn't have clickable link to the profile). But, I think it shows up correctly everywhere else including article titles of articles …

Member Avatar for TrustyTony
0
208
Member Avatar for triumphost

The problem is you test program, the following three lines: Bitmaps A = Bitmaps("C:/Meh.bmp"); Bitmaps B(Bitmaps("C:/Meh.bmp")); Bitmaps C = A; The first line will call the constructor that takes a string (or char pointer). That is simply the syntax to call an `explicit` constructor. The second line does the same …

Member Avatar for mike_2000_17
0
276
Member Avatar for Lardmeister

> Actually, I think it's more likely they will run on water. Hydrogen cell tech seems to be where the really big research and development investment is at. Hydrogen cars are a red herring. I remember my first class in thermodynamics (back in my second year of my Mech. Eng. …

Member Avatar for Stuugie
1
178
Member Avatar for triumphost

The `HANDLE` is what one calls an "opaque pointer". This just means that it is essentially a pointer but you have no idea what it points to, and you're not supposed to know (it's "opaque"). If you library from which you got the opaque pointer does not have a method …

Member Avatar for mike_2000_17
0
4K
Member Avatar for harryhaaren

Yeah, you use a thing called "placeholders". In Boost, these are `_1`, `_2`, etc. The number represents which parameter is passed there, so you can even change the order if you want, and you can fix some parameters and leave others to be passed to the function when it is …

Member Avatar for harryhaaren
0
262
Member Avatar for Dani

The homepage screenshot is nice, but in my profile it shows the screenshot of my department's homepage (Center for Intelligent Machines, McGill), not my homepage. Maybe it is due to the tilde sign in the URL: http://cim.mcgill.ca/~mpersson

Member Avatar for Ancient Dragon
2
243
Member Avatar for alan91

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.

Member Avatar for Lucaci Andrew
0
333
Member Avatar for Perry31

Code optimization and time-complexity are separate issues (at least, IMO). **Algorithmic complexity** Time-complexity just means to analyse what is the relationship between the size of the data and the amount of time it will take to perform a given operation (algorithm) on that data. Typically, N usually represents the size …

Member Avatar for Perry31
0
687
Member Avatar for Dani

I have to admit that I always found "cscgal" to be a rather poor choice, but who am I to speak, right? Changing it to Dani would certainly make it more obvious who you are (although "The Queen of Daniweb", "Administrator", your post count and join-date says a lot already). …

Member Avatar for JorgeM
0
229

The End.