2,898 Posted Topics

Member Avatar for NoCodeMonkey

> First impression, it seems right to me I beg to differ. > Computer Systems Technology – Networking You should write "Computer Systems Technology and Networking" (without quote marks), the dash is confusing, it looks like a separation between propositions (in the grammatical sense) and breaks the flow of the …

Member Avatar for Ketsuekiame
0
350
Member Avatar for vatsal.jariwala.14

It should have come with your compiler. What compiler are you using? If your compiler doesn't find it, maybe the include-paths are not set correctly. Have you done a file-search for "windows.h"? With MinGW, you can download and extract the win32 API headers and libraries from [this page](http://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/). But, normally, …

Member Avatar for asifalizaman
0
20K
Member Avatar for hxc210

The dynamic allocation is unnecessary (and leaking), you could simply do this: int i = 0; for (i; i < n; i++) { Neutron neutron; initNeutron(&neutron); int steps = 0; do { fprintf(file, "%f\t%f\n", neutron.r[0], neutron.r[1]); ++steps; } while (step_succeeded(&neutron)); fprintf(file,"\n"); step_sum += steps; if (neutron.absorbed) ++absorbed; if (neutron.escaped) ++escaped; …

Member Avatar for mike_2000_17
0
377
Member Avatar for Clan Onion

As Jim said, you must see the CPU as an interpreter of machine instructions. It takes in instructions and executes the required actions. In order to have stability over time, it is most practical to have a standard set of instructions that all CPUs (or a class of CPUs) can …

Member Avatar for mike_2000_17
0
1K
Member Avatar for AmrMohammed

> As the titles says I wanna know what are versions of C++ other than Standard C++ and what are the differents between those version if any! The first "version" has to be the ARM (around 1990-1991). This wasn't an official, formal standard document, but the later editions were essentially …

Member Avatar for mike_2000_17
0
901
Member Avatar for triumphost

There are a few observations that I must make before saying anything else. First of all, your `Control` class is a resource-holding class, and [should be designed as such](http://www.daniweb.com/software-development/cpp/tutorials/373787/beginning-c0x-making-a-raii-class). So far, your class is ill-conceived if it is to be holding a resource (i.e., tied to an active window). You …

Member Avatar for triumphost
0
845
Member Avatar for murnesty

> I have some idea on the member and would like to get some suggestion to add / optimize the data structure : One thing certainly pops to mind, include a pointer to the next error log. The reason for this is not for a linked-list linking, but that it …

Member Avatar for mike_2000_17
1
259
Member Avatar for NoUserNameHere

Partitioning / sorting algorithms generally require a [*strict* weak ordering](http://en.wikipedia.org/wiki/Strict_weak_ordering). Meaning that it cannot be symmetric in the sense of less-or-equal on one side and greater-or-equal on the other side, as it is in your pseudo-code, because it would mean that there are "equal" elements that could go on either …

Member Avatar for NoUserNameHere
0
159
Member Avatar for cynusalisa

UNiplexed Information and Computing Service (Unix) Disk Operating System (DOS) Berkeley Software Distribution (BSD) GNU's Not Unix / Linux (GNU/Linux) Free Real-Time Operating System (FreeRTOS) General Motors and North American Aviation Input / Output system (GM-NAA-IO) University of Michigan Executive System (UMES) Dartmouth Time Sharing System (DTSS) Эльбрус-1 Keyboard Entry …

Member Avatar for ankur.pandey.52687
-1
178
Member Avatar for asifalizaman

Do you have a specific question? Otherwise, here are a few remarks on your code: - You are using pre-standard headers like `<iostream.h>` and `<math.h>`. These shouldn't be used today (as in, not since 15 years ago). You should use `<iostream>` and `<cmath>` (all C++ standard headers don't have the …

Member Avatar for asifalizaman
0
354
Member Avatar for kyle.mace.35

The problem here is that you cannot separate the definition and declaration of templates (class or functions). You have to understand that template code is not "real" code, it is a set of precise instructions for the compiler about what code to generate once the template argument(s) have been provided. …

Member Avatar for kyle.mace.35
0
384
Member Avatar for joejodre

If you read the [community rules](http://www.daniweb.com/community/rules), you will see the following: - **Do** post in full-sentence English - **Do** use clear and relevant titles for new articles - **Do not** write in all uppercase or use "leet", "txt" or "chatroom" speak - **Do** read the forum description to ensure it …

Member Avatar for pritaeas
0
157
Member Avatar for TheBrick

The viewport is the rectangular area on which pixels can be drawn. This is usually defined as a corner offset (position of the lower-left corner, i.e., the origin) and a width and height (watch out: some GUI systems or libraries will use the *upper-left* corner as the origin instead, meaning …

Member Avatar for TheBrick
0
1K
Member Avatar for singularity~

Well, there is a typo on this line: vidfeat: libopensift.a videofeatures.cpp $(CCP) $(CFLAGS) $(INCL) videofeatures.cpp -o $(BIN_DIR)/$@ $(LIBS) where it should read as: vidfeat: libopensift.a videofeatures.cpp $(CPP) $(CFLAGS) $(INCL) videofeatures.cpp -o $(BIN_DIR)/$@ $(LIBS) i.e., `$(CPP)`, not `$(CCP)`.

Member Avatar for singularity~
0
310
Member Avatar for Xorlium

What about a filtered iterator? Here is what I mean: template <typename BaseIterator, typename OutputType> struct ActorIteratorImpl { public: // the set of required typedefs: typedef ActorIteratorImpl<BaseIterator,OutputType> self; typedef OutputType* value_type; typedef OutputType* const & reference; typedef typename std::iterator_traits<BaseIterator>::difference_type difference_type; typedef OutputType* const * pointer; typedef input_iterator_tag iterator_category; private: ActorFlag …

Member Avatar for mike_2000_17
0
206
Member Avatar for otengkwaku

> Cold in home with a sick bed. Sorry to hear that. Hope you get well soon! @otengkwaku: I agree, Dani and Daniweb both rock!

Member Avatar for Ketsuekiame
3
665
Member Avatar for A Haunted Army

This sounds like a space partitioning tree. I'm guessing it has something to do with collision detection. In any case, as rubberman said, this is far from being a trivial problem in which picking an STL container is not sufficient (you need something much more elaborate than what the STL …

Member Avatar for A Haunted Army
0
300
Member Avatar for rotten69

If the main problem is that you don't like the interface (unity), then just use a different flavor of Ubuntu. I recommend Kubuntu (12.04 LTS). Mint or Fedora are also good options.

Member Avatar for Nutster
0
357
Member Avatar for chriswelborn

I guess it could make sense. I would certainly like that, as I can provide some help in that domain, and am interested in that in general. I don't have the patience to watch the C forum anymore, just on the off chance that an interesting embedded systems question comes …

Member Avatar for chriswelborn
0
318
Member Avatar for bukhtoyarov.vladimir.7

> describe algorithm how can you do so, while ensuring that no STD is passed around? The more appropriate version of the exact same question is this: You have three very dirty surfaces to clean but only two handkerchiefs. Assuming you cannot fold the handkerchiefs, how would you go about …

Member Avatar for deceptikon
-3
258
Member Avatar for nabeelkhanjadoon10

> > 1500+ lines in a few (2) days... > > Either that includes a hell of lot of blank lines, copying and pasting, or there was no testing because that's just daft! First, it certainly doesn't include blank lines or comment lines, nobody includes those in code-line counts. Second, …

Member Avatar for DoRight
0
7K
Member Avatar for JorgeM

> However, I'm wondering if this type of response is actually counter productive with regard to the ultimate goal of this site which is to generate revenue. It definitely is counter productive. I don't know much about search engine algorithms but I would certainly imagine that they try very actively …

Member Avatar for TnTinMN
3
354
Member Avatar for daino

You are already using the function that you are looking for. The function `system()` executes a command. In this case, you are executing the "pause" command. You can use the same function to execute other commands, including your own program. It's as simple as that: system("InputProgram.exe myargument"); There are also …

Member Avatar for daino
0
738
Member Avatar for JorgeM

Definitely, I have to say it was an internship some years back. I worked in a lab (at Uni Duisburg-Essen) where they had a roller-coaster seat mounted to the end of a Kuka KR560 industrial robotic manipulator (about 600kg payload capacity), similar to the [robocoaster systems](http://www.robocoaster.com/gallery/g1-robot-systems). My job was to …

Member Avatar for <M/>
4
522
Member Avatar for deceptikon

Is there any reason at all for using a `shared_ptr<node>` for your links? Why not use a `unique_ptr<node>`? Why incur the extra memory payload and overhead. It seems to me that the following would be a bit simpler (and smaller, and faster): #include <map> #include <memory> #include <stack> #include <limits> …

Member Avatar for deceptikon
3
406
Member Avatar for wallet123

The default package manager for the 12.04 version of Ubuntu is called "Software Center". You should be able to find it in the main menu (with all the other apps). In the software center, you can search for anything that you want to install (games, applications, libraries, etc.) and install …

Member Avatar for naphets
0
217
Member Avatar for lewashby

Try to install `build-essential` (at least, in Ubuntu repos, I don't know if other debian distros have it too), it will install everything you need. $ sudo apt-get install build-essential Also, if you get the message "unable to locate package ..", then you should try to do a search for …

Member Avatar for naphets
0
173
Member Avatar for Alexkid

Here are a few facts that you need to know: 1. Floating-point numbers are fixed by IEEE standards and do not differ between platform (except for extremely archaic ones). This means you don't need endianness conversions for `float` or `double`. 2. Endianness conversions (e.g., `htonl` / `ntohl`) work on fixed-size …

Member Avatar for mike_2000_17
0
6K
Member Avatar for <M/>

My native languages are **French** (born in Québec, French-speaking part of Canada) and **Swedish** (from my father, I also spent part of my childhood there). I speak **English** just as if it was my native language too. I'm functional / conversational in **German** because I've lived there for about a …

Member Avatar for Lucaci Andrew
0
420
Member Avatar for meetjatin88

For a very technical answer: > which one should be preferable from the following two nested for loops: The one that results in the most predictable and contiguous memory accessing pattern, to minimize cache misses and maximize pre-fetching.

Member Avatar for mike_2000_17
0
192
Member Avatar for Aarowaim

> One, I need a simple way of rendering a GUI with minimal headache. I highly recommend [Qt](http://qt.digia.com/Product/Developer-Tools/). It is in C++ (so, familiar territory for you, and no need to have an elaborate front-end / back-end design), and it is cross-platform (works anywhere, include mobiles). It is pretty much …

Member Avatar for mike_2000_17
1
213
Member Avatar for buckeyemike

In C++, every cpp file is compiled separately, and then linked together. When the functions appear in the same cpp file as the `main()` function, then it is compiled together and doesn't need linking. When the functions appear in a different cpp file, then all the compiled cpp files (compiles …

Member Avatar for mike_2000_17
0
217
Member Avatar for aVar++

Here's a little house, a Sun, and a mid-day drunk: \ | / ( -- O -- ) / | \ ( ) |__|____ / \ /__________\ o | _ | --|-- | |_| || | |\ | || |

Member Avatar for <M/>
1
404
Member Avatar for nitin1

> the words will be stored in the order they are added to the unordered set unlike a set where they are put in order of thier key value. That's not true. Not at all. The values stored in an unordered_set will appear in whatever order they map to through …

Member Avatar for mike_2000_17
0
423
Member Avatar for sfurlow72

> could I do something like this Yes. The mechanism to do this is called "templates". Your function would look like this: template <typename T> T* createEmployee() { return new T(); }; And it would be called as so: Employee* p = createEmployee< Manager >(); For a more complete tutorial …

Member Avatar for mike_2000_17
0
124
Member Avatar for M.Faisal

> Can we install .deb format on ubuntu 11.10 or 12.10 using sudo apt-get install??? In Linux, most software is installed through the package manager. This is an application that connects to a bunch of software repositories on the internet that host databases of .deb files (or .rpm in Red …

Member Avatar for mike_2000_17
0
184
Member Avatar for <M/>

From my teenage years (cerka 5 years): VisualBasic and Delphi. From work experience / thesis-work (cerka 8-10 years): C, C++, Matlab/Simulink, Fortran, LabVIEW, Assembly (reading only), KRC-RSI (Kuka Robot Controller - Remote Sensor Interface language), Bash, and Python. From course-works (which is rather insignificant): Java, MySQL, HTML, and XQuery.

Member Avatar for <M/>
0
261
Member Avatar for diafol

I have a tentalizing scenario for the whole "holding the door" conundrum: double doors. Walk into a restaurant, mall, or building with double doors, whoever gets to walk through the first door held open for them is going to reach the second door before the other. And there comes the …

Member Avatar for Reverend Jim
2
1K
Member Avatar for rajesh1158

Of course, for such a project, you will have to do significant changes to the OS anyways, and in that sense, will end up developing a new derivative or variant of an existing OS. One good option seems to be [MeeGo](http://en.wikipedia.org/wiki/MeeGo) or one of its derivatives. There are a number …

Member Avatar for DoRight
0
255
Member Avatar for MRehanQadri

To do this properly, you need to do a lot of work, and it will become a full-blown class (with private members, non-trivial constructor / destructor / copy-constructor / copy-assignment operator, etc.). [Here is a good tutorial about this](http://www.daniweb.com/software-development/cpp/tutorials/373787/beginning-c0x-making-a-raii-class). > Objective: students could have taken different number of subjects. Now …

Member Avatar for mike_2000_17
0
135
Member Avatar for lewashby

This error message means that you are accessing an address of memory that is not reserved for your program. This usually occurs when you read or write at a location pointed to by an invalid pointer or beyond the valid memory that the pointer points to. For example, these are …

Member Avatar for mike_2000_17
0
423
Member Avatar for andika.kurniawan.121

> I can see methods in stdio.h, iostream, etc in Turbo C++. Please define the term "see". Do you mean that you are opening those header files and looking at their implementation? Do you mean that Turbo C++ has some help menus that list the standard functions? Do you mean …

Member Avatar for mike_2000_17
0
298
Member Avatar for spetro3387

32-bit binaries cannot be mixed with 64-bit binaries, period. There is no (easy) way to create an application that would link to some 32-bit libraries and some 64-bit libraries at the same time. Basically, if the program is 32-bit, then all its libraries (include shared-objects (.so files)) must also be …

Member Avatar for spetro3387
0
5K
Member Avatar for lewashby

> I have been told that in C++ the concept of a string does not exist. A string is just an array of type char. Yes and no. At the fundamental level, a string is just a sequence of characters, and in that sense, an array of characters. This is …

Member Avatar for lewashby
0
246
Member Avatar for christinetom

I don't think you can ask for anything more than all the resources already listed on cmake's [wiki page](http://www.cmake.org/Wiki/CMake).

Member Avatar for christinetom
0
101
Member Avatar for Synapomorphy

Have you defined a copy-constructor? One that performs a deep-copy? You need to obey the [rule of three](http://en.wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming)) when you write a class that holds a resource. You can also read [this tutorial](http://www.daniweb.com/software-development/cpp/tutorials/373787/beginning-c0x-making-a-raii-class). The double-destruction comes from the fact the your object must be getting copied, and when copied, it …

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

That's a nice question. Code readability is really important. Here are a few tips: 1) Leave the explanation of *what* a function does *outside* the function, and the comments about *how* it is done *inside* the function, near the code that does it. 2) Use meaningful and complete names for …

Member Avatar for A Haunted Army
3
265
Member Avatar for 9tontruck

This looks like a classic case of [heap fragmentation](http://en.wikipedia.org/wiki/Fragmentation_(computing)). This is a rather classic problem which will cause the memory consumption to grow larger and larger even when the memory that you actually use is not increasing (no leaks). Normally, this will stabilize to a fixed amount of memory consumption …

Member Avatar for Ketsuekiame
1
215
Member Avatar for sallygo
Member Avatar for Hey90

> what is the best way to pass these variables as a group while using classes? By make the function a member function of the class. In the case of a function like: void view(Shoes *Shoe); The easiest way to do this in object-oriented code, is just as so: class …

Member Avatar for Hey90
0
627

The End.