2,898 Posted Topics
Re: > Check out compability between processor/RAM and motherboard. This will have to do with the motherboard. You have to know the exact make and model of your motherboard and lookup the technical sheet for it. Generally, they should specify for which family of processor it is good for, and what … | |
Re: I see, from a post on another forum, that you used Wubi to carry out the installation. Personally, I never really trusted Wubi (and never recommend it), in part due to the fact that Windows is still underlying the virtual disk (which is kind of unreliable, as all Windows things … | |
Re: Homeopathy is major BS. No doubt about it. Basically, if its principles were true, dropping one drop of beer in the ocean would cure all the alcoholics of the world. Yeah, right! At best, it's nothing more than a placebo. | |
Re: The dd command is essentially just a raw byte copying program. If the "in file" is a disk and the "out file" is a file, it just writes the entire content of the disk (byte-per-byte) into the file. If the "in file" is a file and the "out file" is … | |
Re: [Here](http://www.phanderson.com/C/random.html) is the documentation for the random function. It appears that `random(N)` generates a number between 0 and N-1, very much like the more standard `rand() % N` would do. The `randomize()` function is the equivalent of `srand((unsigned int)time(NULL))`, which is used to seed the random number generator. So, to … | |
Re: The two C++ compilers that matter support it: GCC supports it, see [here](http://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html). LLVM/Clang also supports it, see [here](http://www.imgtec.com/mips/developers/clang-llvm.asp). The Intel compiler is only good if you compile for an intel architecture (AFAIK). The same goes for the IBM compiler, only good for IBM platforms (mostly super-computers and clusters). There … | |
Re: First of all, the "systems programming" term is a bit general and refers to many areas, which usually have the following characteristics: (1) high performance requirements, (2) low overhead (memory, latency, etc.), and (3) involve building a complex software infrastructure. Examples of this might include OS kernels (or device drivers), … | |
Re: Back in the day, I created some water effects (and other similar effects) using [Perlin Noise](http://en.wikipedia.org/wiki/Perlin_noise). There are also alternatives to that classic method, but the general idea is the same. You can generate textures, [height-maps](http://en.wikipedia.org/wiki/Heightmap) (almost-flat mesh, with a regular x-y grid), and/or [bump-maps](http://en.wikipedia.org/wiki/Bump_mapping) (a texture that is used … | |
Re: The error comes from the fact that the compiler has no idea what `stackADT` is. And I have no idea what that is either. Did you forget to include the header in which that template is declared? Also, before you get more errors, you should know that you have to … | |
Re: > why switch to windows 8? Do these reasons count: - Mental illness - Masochism - Seeking relief from the fat wallet syndrome I'm just kidding. ;) I've never used Windows 8, so I can't really comment. > Because any mistake cannot be tolerated? Sometimes I think that the Microsoft … | |
Re: Just so that people understand what this discussion is about. I'm gonna post the essential bits of code that from that section of the book. The first solution that he puts forth (that you are critiquing) is this: template <typename Node> struct node_base { Node* left; Node* right; node_base() : … | |
Re: Let's start with a couple of definitions: "Array": A sequence of elements packed next to each other in memory. "Pointer": An address to a location in memory. So, when you have this: int arr[10]; you have a variable called `arr` whose type is an "array of 10 integers". When you … | |
Re: This actually has nothing to do with the move constructor. The reason why the move constructor is not called is because of return-value-optimization (RVO). This is one of the rare cases where the compiler is allowed to change the behavior for optimization purposes. The point here is that RVO allows … | |
Re: I agree with deceptikon. Learning the way you describe is nice from the perspective of acquiring a deep understanding of everything. I did something similar with mathematics, from basic logic axioms up to calculus of variations, and it was very enlightning and amazing. However, doing this requires, as a pre-requisite, … | |
![]() | Re: Definitely, you need to go for Boost.Asio. It might seem a bit weird to use at first, but just follow the examples / tutorials, and you'll get the hang of it. ![]() |
Re: > lot of people usually don't use const with pointers even when they don't intend to change what the pointer points to, and I just want to know why that is. This is mainly a reflection of the ineptitude or laziness of many programmers in C++. First of all, const-correctness … | |
![]() | Re: I am guessing that you have some sort of memory leak or memory corruption. The out of memory error occurs either if you literally run out of memory (e.g., from a memory leak in a tight loop), or if you corrupted the heap completely (e.g., by freeing memory twice). From … ![]() |
Re: Sounds to me like some kind of ear infection. You will probably need to see a vet if it persists or gets worse. It's hard to tell with infections cause some can just go away pretty quick while others can get real bad real quick. As far as I know … | |
Re: @Excizted: I have to warn you that your post is close to violating the "**Keep it Pleasant**" rule of this forum. We are a welcoming community and we strive for enriching discussions. Your post used bad language and insulting words. As for your remark on "and so what? Do you … ![]() | |
Re: I would assume that `POCO_LONG_IS_64_BIT` detects if the size of the type long or int. Usually, on 64bit platforms, the int type is still 4 bytes (32bit), it's only that pointers are 64bit (to allow more than 4Gb of RAM) and that there are 64bit registers available natively (which could … | |
Re: That's an interesting question. I would tend to disagree with your assessment. Let me just rebut some of your specific statements: > If you reason with science, technology and Engineering, you will understand that science deals with the study to understand whereas technology devices ways to use those theories and … | |
Re: I got an automatic update of openssl yesterday, as part of the regular automatic updating of all software on Linux (Kubuntu). It contains the fix for that bug, as it's [stated on the website](http://www.ubuntu.com/usn/usn-2165-1/). I would assume all other decent Linux distros' repository have been updated too in the past … | |
Re: These are numbers for the U.S., obviously. They seem somewhat high, but I think it's because they just have one average for each job title. I would expect that starting salaries are quite a bit lower than that. For example, for just basic "programmer", they quote around 75k$. Someone seeking … | |
Re: I could see how a tablet can be useful for some types of work where you need a really mobile smart-something for reading or taking notes or maybe light work. Basically, I don't think that the tablet will replace the laptop, it will replace the "pen and paper" stuff like … | |
Re: > Do I need a header file and a .cpp file both to use a custom defined class? In addition to AD's remarks, I just want to clarify what you mean by "use". To *create* a custom class, it is conventional to place the *declarations* in a header file and … | |
Re: I guess I have to say something... Right now, the elections are boring the heck out of me. I usually am pretty interested in them, but this was the first time I couldn't manage to watch through the entire official debate. There's the CAQ party (Coalition Avenir Québec) with their … | |
Re: > what do you prefere for naming: database - c++ - java - php? Like they say: "When in Rome, do as Romans do." To me, it's all about whatever is conventionally used in the project or language in question. None is intrinsically better than another, the only thing that … | |
Re: A character array is just what it sounds like, it's a raw array (sequence of contiguous memory) of characters (1 byte numbers that are interpreted as characters when printed on a screen) with the end marked with a 0 character (null-terminated strings). That's about all you get with a character … | |
Re: First of all, if you are just inspecting the vector, you should pass it by const-reference instead of by value, to avoid an unnecessary copy, i.e., use this: int computer::findMin( const vector<int>& v ) { int minIndex = 0; for( int i = 1; i < v.size( ); i++ ) … | |
Re: You need to provide both a const and non-const version of your `operator[]`, as so: class matrix { //.. float& operator[](int i); float operator[](int i) const; }; //.. float& matrix::operator[](int i) { return M[i]; } float matrix::operator[](int i) const { return M[i]; } //.. | |
Re: No it's not correct. (1) The "conio.h" header is old and often not even supported at all, and it is certainly not a standard header. Also, you are not using any functions from that header, so you should just remove that include. (2) The "stdio.h" is not a standard C++ … | |
Re: A tent and a rental car seems like a decent plan if you mostly aim for natural settings. Also, for the occasional city visits, sleeping in a hostel (youth hostel) is a very good option too. It's usually very cheap (20-40$ per night), if you are not too high-maintenance (which … | |
Re: > We are going to use a game building kit/platform that works on mac, windows and linux. So first, I would like to know if someone can tell me of the platform he might be talking about. There are a few possibilities, depending on the scope. As Alex mentioned, he … | |
![]() | Re: I believe there are options to use a command-line interface for the installation, but of course, the default is the graphical "step-through" interface for doing the installation. Is there a reason why you don't want to use the GUI installer? Ubuntu only seems to provide command-line installation for its alternate … |
Re: > is valid? I ask because I'm wondering what will happen to the returned result when ret (its owner) gets destroyed. I think it might be undefined behaviour. It is indeed undefined behavior (UB). But, remember, "everything works fine" is still one possible behavior when you have a UB situation, … | |
Re: > i have no idea what goes on with my class since they have put me a higher level that i was supposed to be. If you are not able to do what the class requires, then you shouldn't get a passing grade for that class. That's the whole point … | |
Re: Are you talking about the xor-swap trick? Like this: void swap(int& x, int& y) x ^= y; y ^= x; x ^= y; }; | |
Re: You need to show us the cpp files, and the command you used to compile them. The linking errors that you get are telling me that there is no definition for your `set_thresholdfinedflb` global variable, and that there is no definition for the `OnReceive()` function. When you have a global … | |
Re: When you're the "big fish" in the pond, it makes business sense to just swallow up all your smaller competitors. Buying out your competition is the oldest trick in the book, all big companies do it all the time. That's just the normal way capitalism has always operated (capture, consolidate … | |
![]() | Re: Well, since he can't sell anything that is GPL-based (like most of what was brought in from Ubuntu in making the derivative). My guess is that either: 1) Apple has threatened him with a big law suite because he "copied" the Mac OSX features. And now, he is trying to … |
Re: Nice article! I think we are really starting to see a turning point these days. A lot of free software is now catching up to commercial software, or at least, close enough that it becomes hard to justify the cost of buying it. In my opinion, for amateurish work on … | |
Re: C++ is based on C, and C is nearly a subset of C++ (nearly, because there are some incompatibilities, but mostly, these differences are technicalities). C++ has a lot more features than C: - Function and operator overloading (i.e., same name, different parameters). - "Object-oriented features", i.e., classes with different … | |
Re: Did you try the mingw32 package? You can install it with: $ sudo apt-get install mingw32 mingw32-binutils mingw32-runtime or whatever the equivalent packages are for Kali Linux (you might have to manually download the .deb files for these, and install them with `$ sudo dpkg --install name_of_package.deb`). This will make … | |
Re: > Smart pointers are fine, but unless they are combined with reference-counting life-cycle management, are of limited use. I'm not that familiar with C++11's shared pointers, so it looks like I have some additional research to do. :-) Yeah, you probably should. ;) Shared-pointers (`shared_ptr` / `weak_ptr`) are surprisingly robust … | |
Re: Neat piece of code! However, there is one major problem. The problem is that each individual policy (where you have the code) will be instantiated for every unique combination of `P...` packs. For example, if you have these two instances in your code: policies<policy12, policy24> my_policies_1; policies<policy24, policy12> my_policies_2; you … | |
Re: We don't do people's homework here. You show us what you have done, and where exactly you are stuck, and we can help you along. That's it. Doing your homework for you **is not going to help you**. | |
Re: The correct code is this: void StrVec::free() { if (elements) { for_each(elements, first_free, [this] (std::string& p) { alloc.destroy(&p); }); alloc.deallocate(elements, cap - elements); } } | |
![]() | Re: I think that obviously giving a toddler a smartphone is at your own risk (of getting it broken). I'm not sure they are particularly harmful though. My toddler niece sometimes (rarely) plays with her mommy's smartphone. She would randomly navigate the menus (can't read) until she hits a picture of … ![]() |
Re: Using `ofstream file("C:\\sample.txt");` should work, unless you do not have to permissions to create a file in the `C:\\` directory. In general, in C++, if you want more control over the file-system (folders, files, etc.), you need to resort to a library for that (at least, until it becomes standard, … | |
Re: Woot Woot! They solved the problem in the latest chrome update (version 33.0.1750.152). |
The End.