General C++ Programming - September 2009 (Page 5)

by DBarzo
Observer pattern doesn't work
 
Hi, In my library I have this situation (summarized); Public Interface header: struct IAudioEventDispatcher { virtual void AttachEventHandler(v...
[1 reply] : I changed the IWaveStream class, not deriving anymore from IAudioEvent... (by DBarzo)
Partial "function" specialization and performance
 
Hi, for one of my projects I am writing a computational intensive code in C++: it's a code for the resolution of some equations using different methods that ...
[4 replies] Last: Thanks to you both for your help. I am not using macros because I w... (by david84)
Conditional breakpoints in Visual C++ 2005
 
Hello, I have some troubles with using conditional breakpoints in Visual C++. It works fine with simple types(such as int, char, etc), but I can't set up condit...
[1 reply] : str is an std::string, right? The conditional breakpoint evaluator can... (by helios)
how to draw a rectangle in visual C++ 6.0
 
Dear all, I have a problem in Visual C++ 6.0. I made a project using Dialog Based, not Single Document Type. I want to make a rectangle that its color able...
[no replies]
Multithreading with prime numbers
 
Hey guys, I am suppose to write an application which ask the user to enter a number and the program must print out all the prime numbers less than or ...
[4 replies] Last: Ugh. Never mind. I didn't actually read your post, just tried to get t... (by helios)
Menu bar in VC++
 
I used VC++ 6 to create a win32 project (included resource). Then I created a dialog and assigned a pre-created menu to it(properties->menu...). In the program ...
[1 reply] : Never mind. I figured it out. Thanks. (by walker88)
RPN Calcultor
 
I have been at this for days i need some help finishing it. #include <iostream> #include <cstdlib> #include <string.h> #include <stdio.h> //#include <st...
[1 reply] : Line 17: You have two members named 'elm': double elm; Element *e... (by helios)
Code Problem
 
Ok guys, I'm trying to make a turn - based strategy game in which player one presses 1 to attack player two, and player two presses 2 to attack player one. The...
[4 replies] Last: Whenever a player's health is at 0, it always says player one wins! ... (by Outerblob)
c++ and MYSQL
 
Im trying to write a c++ program that inputs variables into the database its not working out so well. I can input into the database but cant seem to input vari...
[1 reply] : "How you insert strings into C++ mysql program" Ok after a lot of t... (by override)
Subtracting Time Logins
 
Hey you guys...I'm having problems trying to subtract the time you check in from the begin.set time...also how long you must wait before the end.set time...here...
[1 reply] : Why do you include "time.h" twice? And what about the declaration of t... (by mspy2plus)
Optimizing string conversion and concatenation
 
I am looking to optimize the speed of the following code as much as possible. I'm from Java world so thing isn't my kind of thing... Any help or tips would be...
[9 replies] Last: wchar_t buf = {0} assigns zero to buf . You don't need it here.... (by kbw)
Declaring Array
 
Hi, what I am trying to do is this: name.h contains a class "support" class support{ private int nr=8; int array ; public int another ....
[2 replies] Last: There are two errors in these lines: int nr=8; // Current C++ does... (by Bazzy)
by DxD
Battleships
 
I am completely stuck now on my void setupships, bool check position, and the play game. I know that the setting up ships requires the players to choose the co...
[4 replies] Last: Ok I fixed the bool declaration. I don't think I want it as a class de... (by DxD)
my code has a problem?
 
#include <iostream> #include<iomanip> using namespace std; bool exists(int array , int length, int newnum) { for (int i=0; i<length; i++) ...
[3 replies] Last: Why did you double post? (by turbozedd)
C++ project, arrays to objects and functions.
 
Okay, I am working on a C++ project but I need some help. Here are my instructions: ////////////////// Write a class called Individual. The class contain...
[1 reply] : http://lmgtfy.com/?q=c%2B%2B+object+array (by turbozedd)
How can I calculate the inaccurate range when working with floating-point
 
I'm newcomer in this forum. And I'm not a native speaker so please easy with me if I'm not good in English. I'm writing a program to check a shape is Hexagon...
[6 replies] Last: You need to use a fixed epsilon. There are already implementations ... (by turbozedd)
Design Problem
 
I have an inheritance problem that looks like this: base / \ / \ derv1 derv2 I have some functions in base that I want to...
[2 replies] Last: I might be a bit off the mark here - but is this the general idea(I k... (by guestgulkan)
how to use Class with Other Classes as Member Data (1,2)
 
Hi What is wrong with my script??? class t1{ public: int variab; t1(int h){ variab=h; } }; class t2{ public: t1 fff();// why not t1 ff...
[21 replies] Last: Operator overloading tutorial: http://www.cplusplus.com/doc/tutorial/c... (by Bazzy)
Indexing Output Correctly
 
I wrote a code to solve the 1D diffusion equation using the Crank Nicholson method. However, when I try to output my solution values they continually overwrite ...
[2 replies] Last: I ammended that part of the code to look like: //time loop for (in... (by bdevhfd)
by Ask2i
Automated naming of dynamic arrays
 
Hi everybody. My Situation: I got a certain variable, which is declared by the size of a dynamicaly generated array. Let's name it (the size) iAmount . The...
[2 replies] Last: Jap. Thanks Bazzy. That'll help. (by Ask2i)
September 2009 Pages: 1... 34567... 14
  Archived months: [aug2009] [oct2009]

This is an archived page. To post a new message, go to the current page.