2,898 Posted Topics
Re: > What do you guys think? I think there must be a misunderstanding somewhere. Your boss' idea of what your job responsibilities and skills are, and your idea of that are definitely not the same. Maybe, as far as he knows, he hired an "IT guy", and if his idea … ![]() | |
Re: You might want to look at the [Wisdom of Chopra](http://www.wisdomofchopra.com/), which is a random quote generator from a database of mumbo-jumbo terms collected from the non-sensical tweets of Deepak Chopra (the meta-physics "guru"). They say you can contact them to get the sources. I think that generating natural language is … | |
Re: I would have to disagree with JasonHippy.. the debugger is not gonna help you in this case. Even before looking at the code, just by the description of the symptoms, it was very obvious to me that this is a memory issue, and most likely a combination of leaks and … | |
Re: Whenever people start talking about recursion I feel compeled to dispell a few myths and make a few "real world" points. Just a few things I'd like to clarify or point out: > Which [iteration/recursion] is to be used depends on the nature of the problem at hand, The nature … | |
Re: First of all, we don't do people's homeworks here. You have to show effort and ask questions about specific problems you are encountering with **your code**. Second, please mention the language in question, so the thread can be placed in the correct forum (by language). | |
![]() | Re: When we are talking about global or namespace-scope variables or functions, the `static` and `extern` specifiers pertain explicitely to the "linkage" of the entity. When `extern` is specified, it means that the entity has "external linkage", which means that the entity will become a symbol that is visible at link-time … |
Re: Here is my career profile: http://www.daniweb.com/profiles/787121/mike200017 Pretty cool new feature! Thanks Dani! | |
Re: > What does 'Pay It Forward' mean? Some sort of jargon? Never heard it before. It's a pretty well-known expression, it's a play-on-words from "pay it back". It's like if you have a debt to someone, you would pay them back. But in this case, if you've been granted something … ![]() | |
Re: > returning the length of passed string was just me testing, but after mentioning it I will instead return length of string copied to buffer. Yes, you should follow conventions. Most functions like this return the number of characters (bytes) written on the destination buffer. At least, that's the C … | |
Re: Have you installed the Nvidia Linux driver? [See here](http://www.nvidia.com/download/driverResults.aspx/72250/en-us). It would seem that the latest appropriate version is 331.38. | |
Re: > What do you get when D is close to 0? When D is close to zero, you get close to an under-determined case and you have to switch to a minimum-norm solution. When the determinant is zero, the matrix is called rank-deficient (row-rank), in mathematical analysis. In numerical analysis, … | |
Re: If you invite people on a Linux/Unix forum to ask them questions about Ubuntu, it won't be very objective because most people here are probably quite familiar with Linux and Ubuntu. So, you should not consider that the number of people who said they knew or used Ubuntu are representative … | |
Re: And so it goes again, Microsoft keeping up with their tradition of alternating between one bad version and one good version: Win95 (OK), Win98 (bad), Win2000 (good), WinME (dismal), WinXP (very good), WinVista (bad), Win7 (OK), Win8 (bad), ... I guess it wouldn't be too bad if they didn't take … | |
Following up on a discussion on [this thread](http://www.daniweb.com/software-development/cpp/threads/470519/looping-using-recursion/), I did some tests on the performance of recursion vs. iteration, and some interesting things happened, so I thought I would share the results. I'm gonna structure this a bit like a lab-report, because that's really the best way to put it. … | |
Re: Yeah, the aging is a major component here. If that pill means that you stay at a middle age like 30-40 or something like that, then we can have a conversation. But I think that if the pill implies that you keep aging, then it would mean that after the … | |
![]() | Re: Being half-Swedish, I can testify that Xmas has very little to do with Christianity. Sweden is both one of the most atheistic countries (if not *the* most) and one with the most Xmas traditions. Sweden is also one of the last places to convert to Christianity in Europe, and many … |
Re: stdafx.h is a Microsoft header that is specific to a feature called "pre-compiled headers" that the Visual C++ compiler (among others) provides. This is not a standard header, and you should not expect it to exist on any other platform than on Windows + Visual C++. If you are very … | |
Re: Happy New Year! (in advance or belated, depending on where you are!) | |
Re: Because somewhere in the implementation of the `std::find` function, there is a comparison of two `classObjects` objects, i.e., there is a line like `(o1 == o2)` where `o1,o2` are objects of class `classObjects`. The error tells you that the operands to the `==` operator (binary expression) are invalid, i.e., there … | |
Re: As triumphost says, the C++ does come with both a [sleep_for](http://www.cplusplus.com/reference/thread/this_thread/sleep_for/) and a [sleep_until](http://www.cplusplus.com/reference/thread/this_thread/sleep_until/) function. Of course, these functions cannot come with any kind of standard guarantees about timing or being a busy-wait or not, or anything like that, but it provide the comforting thought that someone better than you … | |
Re: I don't understand the point of this. Are you publishing code on Daniweb? Usually, code snippets are for demonstration purposes only. Daniweb is not exactly a platform for code publication in general, better try platforms like github or sourceforge. If you want to publish code (in the sense of "hey, … | |
Re: It should be fine. I'm not sure about any particular compatibility issues, but I don't think that a move from 512Mb to 2Gb of RAM on an 8 year old desktop should be a problem. It's a very common "upgrade", or way to give an old computer a second life. … | |
Re: > > I got prit confused with ddanbe > > WOT!? It wouldn't be the first time a Flamish guy is mistaken for a Dutch. ;) | |
Re: > Why is accessing data in an uninitialised array undefined behaviour? It's not really clear whether this is undefined behavior or not. If you **read** uninitialized data, you will read a garbage value, i.e., whatever arbitrary combination of bits that happens to be in that memory location at the time … | |
Re: I would not consider assembly to be a waste of time either. You will find that this "low-level" knowledge that you gained there will be useful later. If anything, it informs the way you program or "see through" the code. > I couldn't afford anything that has a price, and … | |
# Introduction # The subject of this tutorial is a bit more advanced than the subjects I have tackled in the past, but I hope this will find some interested readers. From time to time in C++, programmers find themselves torn apart between using a *Generic Programming* style which primarily … | |
Re: Matlab / Octave: disp('Hello World!'); Pascal / Free-Pascal / Object-Pascal (Delphi): program HelloWorld; begin writeln('Hello World'); end. Fortran: program hello print *, "Hello World!" end program hello Also, see [this wiki listing](http://en.wikipedia.org/wiki/List_of_Hello_world_program_examples). | |
Re: I have done this several times with different computers in labs and stuff. It is purely a matter of configuring the routers to assign reserved IP addresses to your computer and then configure your subnet masks to make sure that packets going to the internet are routed through your internet … | |
Re: It's basically user preference. Vi is meant to be a very comprehensive editor, and it has tons of commands and special features. Nano is more of a basic text editor (think "notepad in the terminal", i.e., nothing more than copy-paste, exit-save). I generally prefer nano because for the times that … | |
Re: Here's my take on this. I mostly agree with most posters so far. Just adding my grain of salt. Myth #1: "[ICODE]const[/ICODE] variables are less efficient than [ICODE]#define[/ICODE]s" First, all const-variables are not the same. In this case, we are talking only about const-variables which could be (easily) replaced by … | |
Re: A bitmask is a special number that has a bunch of bits (0/1) set to 1 such that when you do a bitwise AND with another number, you get only those bit values. This is useful in many contexts, it basically extracts only the parts of a number that are … | |
Re: Really funny. Any time I see people arguing about language X vs. Y, I'll link to that article. But, if you see me arguing about language X vs. Y, then, obviously, I'm right! ;) | |
Re: As Ancient Dragon says, this is an English-speaking forum. I do understand French and could read the assignment you posted, which talks about a simple "[tokenization](http://en.wikipedia.org/wiki/Tokenization)" problem. For the benefit of others, the assignment asks to create a C++ program that (1) reads text from a file and then displays … | |
Re: Same as Jim. All I can seem to recall is that I might have gained a rank in one place and lost a rank in another, that's about all I can see. | |
Re: If you cannot get as far as to boot from another media, then it means that the bios boot sequence has been altered. Microsoft has a long history of making tweaks to the bios firmware as part of an intermediate step in the installation (or update, I guess). Basically, if … | |
Re: Yeah, it's quite sad. Although, it was expected for some time. @Warrens80: Bringing down the apartheid is no mean feat. And be prepared for a flurry of down-votes. | |
Re: Merry Christmas to y'all! Wish you all the best and good health. (and don't get too fat on holyday food!) | |
Re: Roll out a new health-care program that will allow millions of Americans to get insurance, possibly saving their lives. Yeah.. the server is going to get overwhelmed. Why is anyone surprised? | |
Re: @AD: I don't think that the OP is really interested in a Qt vs. .NET debate in this thread. It would be like answering a question about a problem with some C++ code, and recommend as an answer to opt for a completely different language instead. It's off-topic. In any … | |
Re: > I can't see how that could go wrong, given the pissy tendencies of many SO regulars. :rolleyes: Yeah. Their fuses are about as short as their answers. Their ability to accept criticism is inversely proportional to their reputation points. Their concern about helping others can only reside in the … | |
Re: As stated on the Peppermint website, your system is on the limit of being good enough to run the OS. So, that might just be the reason behind your slow issues. You could try an older versions with less requirements. One thing to check is, of course, the md5sum on … | |
Re: The problem is with lines 51-52: t = clock(); t = clock() - t; which is the same as `t = clock() - clock();`, which is the same as `t = 0;`. So, that's why you get zero all the time. | |
Re: There are a number of ways to do it. Here are some options: 1) Use the C++ counterpart to "SortedList" which is called `std::set` (see [docs](http://www.cplusplus.com/reference/set/set/)). This is a container of elements that are sorted. However, just like SortedList, this is implemented using a binary search tree (some kind of … | |
Re: > Are you finding yourself using the new homepage now? Yes. And I'm glad Fred is gone! | |
Re: Jumping the cmos pin is not going to do anything to your hard-drive. This only resets the firmware and configuration of your bios to its original (factory) configuration. It will not affect the OS boot sequence, nor the OS installation itself. But I doubt that this would be a bios … | |
Re: This would depend on the IDE you are using. It will usually be somewhere within the project's directory, i.e., near the cpp file, but not exactly in the same directory. Look for a directory named either "Release" or "Debug", or even "build". Alternatively, just make a file search for the … | |
Re: I would be quite surprised if this was a problem with the CPU overheating. As far as I know (and I'm not an expert), a CPU cannot overheat that fast (few minutes), unless there is significant and visible damage of the thermal paste or a nearby burned circuit. If you … ![]() | |
Re: > Why is it at 5? Arg, this is so confusing. Because you are reading two names per iteration when you do this: while(names >> students) { names >> lastInFile; i++; } You read one name into `students` and then another into `lastInFile`. Because you have 8 names, and you … |
The End.