2,898 Posted Topics

Member Avatar for hotelsinger

> 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 …

Member Avatar for diafol
2
392
Member Avatar for mathijs

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 …

Member Avatar for mathijs
0
125
Member Avatar for emorjon2

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 …

Member Avatar for mike_2000_17
0
568
Member Avatar for Schol-R-LEA

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 …

Member Avatar for Ancient Dragon
1
2K
Member Avatar for Sarwar_1

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).

Member Avatar for <M/>
-1
134
Member Avatar for ArashVenus

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 …

Member Avatar for Ancient Dragon
0
230
Member Avatar for Dani

Here is my career profile: http://www.daniweb.com/profiles/787121/mike200017 Pretty cool new feature! Thanks Dani!

Member Avatar for Dani
1
395
Member Avatar for Ancient Dragon

> 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 …

Member Avatar for diafol
0
255
Member Avatar for Suzie999

> 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 …

Member Avatar for Suzie999
0
295
Member Avatar for Igjarvi

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.

Member Avatar for rubberman
0
191
Member Avatar for gerta_1

> 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, …

Member Avatar for duskoKoscica
0
541
Member Avatar for ZixCo

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 …

Member Avatar for mike_2000_17
0
182
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
0
131
Member Avatar for mike_2000_17

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. …

Member Avatar for Tumlee
4
685
Member Avatar for ddanbe

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 …

Member Avatar for Ancient Dragon
2
2K
Member Avatar for Warrens80

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 …

Member Avatar for Reverend Jim
0
1K
Member Avatar for bryanblake
Member Avatar for Lp_baez

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 …

Member Avatar for mike_2000_17
0
443
Member Avatar for kal_crazy

Happy New Year! (in advance or belated, depending on where you are!)

Member Avatar for kamranali441
1
344
Member Avatar for learncoding

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 …

Member Avatar for learncoding
0
2K
Member Avatar for richieking

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 …

Member Avatar for deceptikon
0
2K
Member Avatar for triumphost

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, …

Member Avatar for mike_2000_17
0
4K
Member Avatar for Inlovewithnight

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. …

Member Avatar for caperjack
0
231
Member Avatar for pritaeas

> > I got prit confused with ddanbe > > WOT!? It wouldn't be the first time a Flamish guy is mistaken for a Dutch. ;)

Member Avatar for pritaeas
0
266
Member Avatar for triumphost

> 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 …

Member Avatar for mike_2000_17
0
193
Member Avatar for Mark_Miller

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 …

Member Avatar for mattyd
0
406
Member Avatar for mike_2000_17

# 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 …

2
2K
Member Avatar for tayspen
Member Avatar for james.lu.75491856

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).

Member Avatar for avishek12345
0
298
Member Avatar for rosy0123

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 …

Member Avatar for sevitsil
0
4K
Member Avatar for pelle12

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 …

Member Avatar for mike_2000_17
0
379
Member Avatar for Labdabeta

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 …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for nicholas.f.fortino

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 …

Member Avatar for mike_2000_17
0
157
Member Avatar for Reverend Jim

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! ;)

Member Avatar for mike_2000_17
3
306
Member Avatar for safoin

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 …

Member Avatar for mike_2000_17
0
93
Member Avatar for Dani

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.

Member Avatar for stultuske
2
380
Member Avatar for Corey _1

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 …

Member Avatar for mike_2000_17
0
503
Member Avatar for GrimJack

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.

Member Avatar for GrimJack
2
838
Member Avatar for happygeek

Merry Christmas to y'all! Wish you all the best and good health. (and don't get too fat on holyday food!)

Member Avatar for Ancient Dragon
3
307
Member Avatar for HiHe

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?

Member Avatar for mike_2000_17
1
858
Member Avatar for Suzie999

@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 …

Member Avatar for Ancient Dragon
0
543
Member Avatar for Dani

> 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 …

Member Avatar for mike_2000_17
3
235
Member Avatar for h6rny69

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 …

Member Avatar for mike_2000_17
0
182
Member Avatar for mrmodest34

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.

Member Avatar for meta.quota
0
511
Member Avatar for dougy83

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 …

Member Avatar for dougy83
0
13K
Member Avatar for Dani

> Are you finding yourself using the new homepage now? Yes. And I'm glad Fred is gone!

Member Avatar for happygeek
1
829
Member Avatar for 73formula

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 …

Member Avatar for 73formula
0
235
Member Avatar for princessophia

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 …

Member Avatar for ling_tj
0
329
Member Avatar for bejea

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 …

Member Avatar for P0lT10n
0
275
Member Avatar for mixelplik

> 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 …

Member Avatar for mixelplik
0
1K

The End.