2,898 Posted Topics

Member Avatar for Mike_danvers

> okay so how many rep points are needed to grab a top level position of daniweb amigo?? Take the number of rep points that Ancient Dragon has, multiply that by 10%, and that pretty much means you are at top level.. i.e., if you can come up to AD's …

Member Avatar for Mike_danvers
0
278
Member Avatar for man.chester.581

I highly recommend [Qt](http://qt.digia.com/). It's a library with a few additional tools. There is also a plug-in for Visual Studio, or you can use its native IDE (Qt Creator, which uses MinGW/GCC). There are plenty of tutorials online to show you how to do it step by step. It's pretty …

Member Avatar for glenwill101
0
300
Member Avatar for The Dude

@TheDude: How is it possible that with the name you bear you didn't name "The Big Lebowski" in your list? > 4) The Toy - 1982 It's one of the least terrible Hollywood remake, but the original French version is still much better. > 9) The Girl with the Dragon …

Member Avatar for Reverend Jim
0
279
Member Avatar for Curious Gorge

Another open-source operating system you might want to look at if you are interested in this is the [FreeRTOS](http://www.freertos.org/a00104.html) project. This is a very small real-time operating system designed for embedded system (micro-controllers, i.e., very tiny computers on a single chip). This might be an easier introduction to the practical …

Member Avatar for Curious Gorge
0
250
Member Avatar for Jorge_6

A colleague of mine was using Kinect in Linux not so long ago. I believe he used ROS's modules for it (ROS: Robot Operating System, which is comprehensive robotics library (mostly C++, with python bindings)). I think ROS uses the openni library for this. All I know is that it …

Member Avatar for mike_2000_17
0
321
Member Avatar for fahadmunir32

I must concur with deceptikon on this... Be careful about self-proclaiming yourself an authority in a matter that you clearly only have cursory knowledge of. I have looked at your top three entries (the character testing thing, the switch-statement thing, and the recursive linear search (yuk..)). They are all poorly …

Member Avatar for rubberman
0
526
Member Avatar for alyssa.wilkins.77

I just wanted to point this out. There is a very important error in the truth table that you posted, it should be this: A B C D Y 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 …

Member Avatar for alyssa.wilkins.77
0
177
Member Avatar for Labdabeta

One minor thing, I would probably move this test: if (numerator.sign()!=denominator.sign())//result is negative return -((-numerator)/denominator); to the start of the function to avoid a double testing for the 0 conditions. Currently, if you have a negative, non-zero fraction, you first test both num and den for being zero, then, you …

Member Avatar for mike_2000_17
0
1K
Member Avatar for RikTelner

You can certainly do it. There are a few ways, depending on what customizations you made and what the destination is (dual-boot, etc.). But it is certainly possible. For example, see the instructions given [here](http://askubuntu.com/questions/32499/migrate-from-a-virtual-machine-vm-to-a-physical-system). If your customizations are limited to the list of installed packages and the contents of …

Member Avatar for RikTelner
0
153
Member Avatar for Compton11

I always find it funny how interviews, which presumably are aimed at getting to know that you are not just a pedestrian CS student and that you have some real experience and insights, end up asking a bunch of pedestrian CS questions. > 1) What's the difference between an abstract …

Member Avatar for jwenting
0
320
Member Avatar for Febel

We don't do people's homework here. You have to show that you are actively trying to solve the problem on your own, and ask specific questions about your code and how to fix it. Please show what you have done. I would advise that you just start by trying to …

Member Avatar for rubberman
0
187
Member Avatar for Elixir42

Technically, you could just overload the operators for the classes `std::ofstream` and `std::ifstream`. Whenever the stream object is of a class derived from the file-stream classes, then it should pick that overload instead of the non-file-stream overloads, just because the file-stream classes are more derived (specialized) than the non-file-stream classes. …

Member Avatar for vijayan121
0
4K
Member Avatar for spoudel
Member Avatar for wildplace

> precompiled headers are NOT microsoftism they are part of C++ That's half-true. Precompiled headers are certainly not part of standard C++, in the sense of what the ISO standard document describes (which is admitedly also the case for most practical compilation mechanisms). However, it is a common feature that …

Member Avatar for deceptikon
0
2K
Member Avatar for khess

alexanpasha already mentioned the very huge systems like mainframes and supercomputers where Linux is extremely important, and at the very least, Unix variants (incl. Linux) dominate the scene completely. Especially in the last decade, the industry has been migrating to Linux systems more aggressively as they realized that it is …

Member Avatar for rubberman
0
3K
Member Avatar for RikTelner

Why on Earth would you want to recreate DOS? DOS was terrible when it came out, and now, it belongs in a museum. Like neanderthals, it's a relic of the past, and a misfit that was doomed for extinction. If you want a real powerful command-line operating system, you need …

Member Avatar for RikTelner
0
717
Member Avatar for Curious Gorge

> I found out the way C++ passes arrays around (via a pointer) makes finding the end of the array impossible! That's true, but you can keep track of how large the array is. That's the usual method. > So my question is how do developers make these string classes? …

Member Avatar for Curious Gorge
0
222
Member Avatar for Vasthor

Here is the corrected code: StrBlob.h: #ifndef EXERCISE_STR_BLOB_H_ #define EXERCISE_STR_BLOB_H_ #include <vector> #include <string> #include <memory> class StrBlobPtr; class StrBlob { friend class StrBlobPtr; public: typedef std::vector<std::string>::size_type size_type; StrBlob(); StrBlob(std::initializer_list<std::string> il); std::size_t size() const { return data->size(); } bool empty() const { return data->empty(); } // add and remove elements …

Member Avatar for Vasthor
0
389
Member Avatar for pritaeas

I get the same lagging issues. I also think it is a server issue because if I click on a link to a forum and it lags, it will show the "Waiting for.." at the bottom corner of my browser (Chrome). I assume that this means it's the server that …

Member Avatar for Dani
3
381
Member Avatar for serkan sendur

Here are my 2 cents (that is, 2 Canadian cents, and because pennies have been put out of circulation and prices are rounded to the nearest 5 cents, I guess my opinion is really worth nothing ;) ). I haven't used MS Office in years, but not really in favor …

Member Avatar for Reverend Jim
0
333
Member Avatar for archie.herbias

I agree that the most fool-proof method is to plug it in before starting to computer (or plugging it in and restarting). I imagine that a restart of the X server should work as well (there are a few ways to trigger a restart of X). One thing that could …

Member Avatar for archie.herbias
0
1K
Member Avatar for Labdabeta

Clearly, the paths that are ambiguous are: `B` -> `A` -> `const A&` -> `A`; and, `B` -> `double` -> `int` -> `A`. I know this because if you remove the `double` conversion operator it solves the problem (in both cases). Or, you can also make the operator `explicit` (C++11): …

Member Avatar for Labdabeta
0
313
Member Avatar for aditya.rohilla.50

Just install a version of Linux, and start playing around with it. Do stuff in the terminal, write code, write scripts, etc.. It all depends on what you want to do with it (sys admin, coding, etc.). There are basically two main families of Linux distributions: Red Hat and Debian. …

Member Avatar for rubberman
0
200
Member Avatar for Ancient Dragon

It seems to me like a connection problem of some kind. It's possible that there is a bug with the game, with its server communication protocols, or with its compatibility with Win-8.1. At least, make sure everything is up-to-date, that includes: Windows, graphics drivers, the game, and DirectX. If the …

Member Avatar for jwenting
0
200
Member Avatar for mixelplik

Your assign function takes the parameter **by value** which means that it creates a local copy of the passed variable and changes only that. If you want the changes made in the assign function to be reflected on the variable passed to it, you need to take the parameter **by …

Member Avatar for mixelplik
0
99
Member Avatar for happygeek

One of my longtime favorite starts to a song is AC/DC's kick-start to "You shook me all night long": *She was a fast machine she kept her motor clean She was the best damn woman that I ever seen She had the sightless eyes telling me no lies Knocking me …

Member Avatar for happygeek
0
271
Member Avatar for udaya.kiran.969

It's the same as in C, except that the header is included with `#include <ctime>`, and all the functions and stuff are in the std namespace (so you have to do `std::` in front of each name, or do a using-statement).

Member Avatar for mike_2000_17
0
60
Member Avatar for Ancient Dragon

you can convert almost anything into anything with the combination of [unoconv](http://dag.wiee.rs/home-made/unoconv/) and [pandoc](http://johnmacfarlane.net/pandoc/demos.html).

Member Avatar for jeffcogswell
0
263
Member Avatar for Sanjeetjmp

Are you talking about [template specialization](https://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fexplicit_specialization.htm), or are you talking about [overloading function templates](http://www.gotw.ca/gotw/049.htm)?

Member Avatar for mike_2000_17
0
117
Member Avatar for Neelam_1

@deceptikon: You misunderstood what the OP was referring to. She is referring to a local class, not a nested class. In other words, this is the case in question: void f() { class inside { public: static int x; // Forbidden! }; }; And the explanation for why this is …

Member Avatar for Neelam_1
0
276
Member Avatar for riahc3

Yeah, the copyright should normally state the period that it covers: from the date that the material was written to the date that the material was last modified. That has always been my understanding. I don't know if this is a requirement or not, but it is certainly the conventional …

Member Avatar for mike_2000_17
0
171
Member Avatar for EDWIN MUGAMBI

Hi, and welcome to Daniweb! C++ is indeed a wonderful language, and I look forward to your contributions / questions on it.

Member Avatar for Dani
0
293
Member Avatar for sfuo

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 dexblack_1
0
12K
Member Avatar for Ketan022

> The one who does not know how to access it will be confused but that really does not mean that we are restricting user to access it accidently. That's not exactly true. Private or protected data will restrict the user from accessing the data **accidently**. It is true that …

Member Avatar for mike_2000_17
0
175
Member Avatar for Ancient Dragon
Member Avatar for Learner010

Given your example code, here is how it should normally be structured: In "functions.h": #ifndef MY_LIB_FUNCTIONS_H #define MY_LIB_FUNCTIONS_H int factorial(int n); bool IsEven(int n); double sqr(int n); #endif // MY_LIB_FUNCTIONS_H In "functions.cpp": #include "functions.h" int factorial(int n) { if(n==0) return 1; else return n*factorial(n-1); } bool IsEven(int n) { if …

Member Avatar for Learner010
0
231
Member Avatar for Emma_3

The `break;` statements in the outer switch statements should be moved to after the inner switch statements. The break instruction marks the end of the code within a switch-case. That's why your inner switches don't ever execute. So, Line 42 should be moved to Line 71, and Line 78 should …

Member Avatar for AndrisP
0
219
Member Avatar for marek.mikes

> seasonic 500w energy knight source This seems like a very weak power-supply for a relatively new computer. I had a relatively new computer about 3 years ago with a 550W power-supply, and it ended up breaking because it was under-powered, and so, replaced it with a 850W power-supply and …

Member Avatar for mike_2000_17
0
303
Member Avatar for A Haunted Army

It seems that what you are looking for is essentially the same as this [audio changer](http://www.virtualaudiostreaming.net/audio-changer.html). And I would imagine that they just use code similar to [virtual audio drivers](http://code.msdn.microsoft.com/windowshardware/virtual-audio-device-3d4e6150) to achieve this. Which seems like a pretty good starting point for making your own. I don't know what else …

Member Avatar for A Haunted Army
0
152
Member Avatar for Seba Sama

There is absolutely no difference between the two. Personally, I prefer `int* var` because it keeps the variable name clean and the type definition together. But this is merely a matter of personal preference, i.e., it's esthetics. But functionally, it makes no difference at all.

Member Avatar for rubberman
0
379
Member Avatar for iamthwee

Like rubberman said, if you have a 64bit system, run a 64bit OS. Basically, a 64bit CPU is made to use 64bit numbers and instruction sets. It will support the 32bit numbers and instruction sets, but it's like running in a "compatibility mode" or something like that. The point is, …

Member Avatar for iamthwee
0
275
Member Avatar for Elixir42

Technically, you could make this work using this: boost::shared_ptr<HINSTANCE__> spHDL (LoadLibrary("DllMain.dll"), FreeLibrary); // get the function pointer CreateFoo = (fpFunct1)(GetProcAddress(spHDL.get(), "CreateFooClassInstance")); However, this reliance on `HINSTANCE__` makes me cringe. The problem is that you are not really supposed to assume that `HMODULE` is defined as `HINSTANCE__*`. The Win32 API does …

Member Avatar for Elixir42
0
2K
Member Avatar for schugantor

Technically-speaking, there is no such thing as a "C++ program", because once you have "compiled" the C++ source code, you have an "executable program" (i.e., a ".exe" under Windows, or no-extension under Unix/Linux/Mac). And running an executable program is the same regardless of language or platform (either go into the …

Member Avatar for mike_2000_17
0
165
Member Avatar for vick4523zf

> 1.What is the "Global Rebuilding" technique exactly? I would assume that it refers to a complete destruction of the tree and a complete reconstruction of it. This is what I usually call a "collect-and-rebuild" process. When you have a tree or a sub-tree that needs to be re-balanced, some …

Member Avatar for vick4523zf
0
318
Member Avatar for dingo#

Open the computer and assess the damage. If it blew up and puffed smoke, then you should see evidence of burning, hard to miss. > Now ive noticed that the voltage switch was on 115v instead of 230v. I think you meant the other way around.. anyways, that difference in …

Member Avatar for PcTestCard.com
0
789
Member Avatar for James19142

Just one thing to make sure it, have you disabled [back-face culling](http://en.wikipedia.org/wiki/Back-face_culling)? It's a common mistake that can cause faces to not be drawn just because the vertices are wound in the wrong direction (cw / ccw). Other than that, it is hard to see a problem with a partial …

Member Avatar for James19142
0
847
Member Avatar for RikTelner

> Yeah, but I mean only programmed code. That's your mistake right there, you cannot control or restrict the means by which attackers attack. It's like your asking if it is possible to build an unbreakable wall to keep intruders out, while in reality, intruders will get in either by …

Member Avatar for Coloradojaguar
0
358
Member Avatar for najiawad0

> Why would you want to put ubuntu on your mac? Because you are ready to grow up. You bought an expansive toy, and now you want to have a useful computer. ;) > Are we talking wiping the Mac and installing Ubuntu or a virtual machine? I don't think …

Member Avatar for Violet_82
0
269
Member Avatar for mixelplik

From the prints, it seems that your sorting function sorts the number in decreasing order, but your binary search function assumes that the array is sorted in increasing order (from lowest to highest). You need to reverse the logic in one of these two methods if you want things to …

Member Avatar for vmanes
0
214
Member Avatar for bm42

triumphost is correct about the destruction. The destructors of the FooA or FooB classes will never be called in your code. Instead, only the (default) destructor of the IFoo class will be called. You need to create a virtual destructor in the IFoo class: class IFoo { public: virtual void …

Member Avatar for bm42
0
1K

The End.