49,766 Topics

Member Avatar for
Member Avatar for idontexist

I have made a simple console based flash card program for the children in my house (and for practice as I just started teaching myself the language). It uses srand to get 2 numbers and has the user input the question. I have included addition, subtraction and multiplication but i …

Member Avatar for idontexist
0
307
Member Avatar for seanhunt

Hi There! Quick, probably dumb question but I have the following snippet [code] template<typename T> class Natural : public ArbitraryNumber{ std::vector<T> mVal; std::vector<T>::iterator mIter; [/code] instantiated with [code] math::Natural<long double> z; [/code] in my main module. Visual C++ dislikes this. When I put this in: [code] typename std::vector<typename T>::iterator mIter; …

Member Avatar for seanhunt
0
126
Member Avatar for Jason123

How to counter invalid input for char. Let say i have a menu which allow user to key in and cin only accepts char. How can i make sure that user to more key in a string etc.

Member Avatar for Jason123
0
180
Member Avatar for Shanebear

My assignment is to have an even integer greater than 2 entered and to output two odd prime numbers that add to it. We're supposed to use a bool function but I'm having trouble compiling. I'm getting an error that says "ambiguous overload for operator in cin >> variable" No …

Member Avatar for Evan M
0
114
Member Avatar for Villanmac

Hi im trying to mess about with a microcontroller but I dont understand what the code means... bsend (0x0E0); Also the codes PD3 = 0X70 AND PD3 =0X7F mean nothing to me, are they related to establishing some of the ports on my microcontroller? Thanks for any help

Member Avatar for ArkM
0
227
Member Avatar for cerb63

Create a program which will create a Hero's Inventory. The program should take the user input (a number) and put that item into the inventory (for example, if the user enters 1. Sword, the program should insert the string "Sword" into the inventory). You will need to add a loop …

Member Avatar for Freaky_Chris
0
96
Member Avatar for Daria Shmaria

Hi! I'm very new to C++ and have two questions whose answers are probably comically obvious. Any suggestions you have will be accepted gratefully. I'm writing a program that calculates the average of integers (grades) input by the user. Once the average is computed, the program should ask if the …

Member Avatar for Daria Shmaria
0
7K
Member Avatar for GirouxCalder

Hi everyone. Little new here but hope for everyone's help =). I am doing a maze for my Computer Science class. My program needs to read the maze from a .txt file and print the solution after. Im only in beginning stages but that's alright. The problem I'm having is …

Member Avatar for nucleon
0
114
Member Avatar for gotm

I want to convert two C++ programs into MIPS assembly. Both programs compute if a given integer is prime or not. They both contain the same main() pretty much, but one uses an iterative function while one uses a recursive function. I am not too good with MIPS so I …

Member Avatar for Salem
0
1K
Member Avatar for Liszt

I am using the fileSystemWatcher and the _Changed event to indicate what file that was LastWritten to in a folder and then I want to read this file. It seems that the code that I have below is executing twice and the second time the code runs I get this …

Member Avatar for Liszt
0
251
Member Avatar for Smed

Hi, I appologize for a lack of specificity, but i'll try my best to explain what i want to do. I want to write a program that will run other programs within a single window, so that they're neatly organized. For instance; I usually run about 3 Xterminals that i …

Member Avatar for William Hemsworth
0
203
Member Avatar for barbiedoll3

this is the main program # include "list_3358.h" # include "stack_3358.h" # include <iostream> # include <string> # include <fstream> #include <vector> using namespace std; using namespace stack; using namespace linked_list; int main(int argc,char* argv[]) { string str; str=argv[1]; STACK_3358<string> stack1; //ifstream infile( str ); ifstream file_op( str.c_str() ); do …

Member Avatar for Freaky_Chris
0
105
Member Avatar for ch.shivakumari

Hi I need to detect memory leaks in c++ assembly.Is there any tools to detect memory leaks?please tell me.

Member Avatar for Salem
0
32
Member Avatar for skatamatic

For an assignment I must implement an operator -= to remove points from a canvas (that have been plotted broken line graph style). Here's the part where the problem is occuring. It certainly removes points, just not the right ones seemingly and not all of them. It doesn't make much …

Member Avatar for skatamatic
0
336
Member Avatar for Liszt

I have to confirm how the buffersize is working for the fileSystemWatcher. I have found this explanation on google: [I]The FileSystemWatcher class works by capturing all of the relevant file and older changes and placing them into a buffer. This is then processed one change at a time until all …

Member Avatar for Narue
0
102
Member Avatar for Nadescio

Hi I would like to know if it is possible to remap a joystick to keyboard inputs and if so how would i go about it i need this because im trying to make a wrapper for a game which only supports keyboard input im kinda new to c++ too …

Member Avatar for TheBeast32
0
102
Member Avatar for koushal.vv

Hi i have developed an MFC sdi application ( C++ ), when i deploy this application in another machine the Grid component is not showing up in the UI. The Grid which is used is MSFLEXGRID version 6.0. But i found that when i install VS2005 on the machine which …

Member Avatar for ithelp
0
129
Member Avatar for morais

I would like to insert a function AFXMessageBox in generic class, but the compiler said this "error C2665: 'AfxMessageBox' : none of the 2 overloads can convert parameter 1 from type 'char [30]'" . I have de same code in oder project type CDialog and i haven't any error

Member Avatar for Ancient Dragon
0
280
Member Avatar for ashishchoure

I have to develop an application which is similar to outlook in which i have to create a button by which we can transfer mail message to user specific folder.I am using MFC for that application. I found that there is api called MAPI(messaging application programming interface) which provide two …

Member Avatar for marco93
0
128
Member Avatar for Se7Olutionyg

[code]#include <iostream> using namespace std; //Function declare void displayMenu(void); void getSelection (int &userChoice); void processChoice (int userChoice); float monitorCoke( float, float ); float monitorpep ( float ,float ); float monitorcana ( float ,float); float monitorhire ( float,float ) ; // variable declare and const float option, cocaout, pepsiout ,canaout,pepleft,canaleft,cokeleft,hireout; const …

Member Avatar for VernonDozier
0
135
Member Avatar for helpmeout

HI this is my first post here i am using dev c++ and i had been going through windows game programming for dummies. i am now facing a problem of how to display the text ie if the user enters a name how to display it and please tell me …

0
53
Member Avatar for JustLearning

When I try to compile and run this file I get a segmentation fault when the size function is called so I must not have it set up right. The size function returns the number of stored chars in the queue. So I am thinking that the size function in …

Member Avatar for JustLearning
0
184
Member Avatar for rrlangly

I'm trying to create a central event system for my game where I add some events to a priority_queue and pull off the first one as soon as it expires. But I'm having a problem of understanding if I'm adding them to the queue correctly, if they're in order, or …

Member Avatar for stilllearning
0
154
Member Avatar for c++noobie

I have a feeling ya'll get plenty of cin questions here and are quit tired of them, but I have a few that are a little more in depth. I started trying to write my own input stream flush template and had some very minor successes when I found the …

Member Avatar for c++noobie
0
174
Member Avatar for iamtuxmeister

I am new to the world of compiled programming languages. I do most of my work with Perl and bash scripting. I was recently asked to pursue a listener to the Asterisk Manager Interface that will be able to pull out caller ID information based on the extension that the …

Member Avatar for Salem
1
250
Member Avatar for FtKShadow

Its not so much help that I need I just dont understand what my teachers asking. Anyone know? [QUOTE]Write overloaded min functions. One function will return the min of two integers, the second function will return the min of 3 integer values. Hint: see if you can use the two …

Member Avatar for Ancient Dragon
0
114
Member Avatar for Duki

Hey guys, my prof is looking for a good polymorphism project. The one's in the book weren't good at all. Could someone give a suggestion?

Member Avatar for Firasath
0
120
Member Avatar for DemonGal711

I have to fill in a 2^n by 2^n board that has a hole in it with tiles that look like the example below. The tile we have to use is the combination of the 1's in the image below and the 0 is the hole (cause I really don't …

Member Avatar for DemonGal711
0
176
Member Avatar for alin_yuhee

i want to make a game :) by using c++ but i can't finish it :( because of there are some problem about the code....the aim of the game is to stop the ball from hitting the right wall by moving the box. 10 pts r given 4 stopping it …

Member Avatar for Freaky_Chris
-1
126
Member Avatar for kawafis44

Hello! It is my first post and I've got probably easy question. I can use containers like list, vector. But I think there is no tree container in standard containers of C++. I found [this site](http://www.gamedev.net/reference/articles/article2192.asp) and I'd like to use it. The problem is that I do not know …

Member Avatar for Sci@phy
0
123

The End.