49,756 Topics

Member Avatar for
Member Avatar for agaba

This is my Code #include<iostream> using namespace std; struct BankAccount { int accountNum; double accountBal; double rate; }; int main() { const int ACCOUNT = 5; BankAccount info[ACCOUNT]; int sub; double balTotal = 0; double balAverage; int accountNumber; bool isFound = false; for(sub =0; sub<ACCOUNT ; ++sub) { cout<<"Enter Account …

Member Avatar for agaba
0
102
Member Avatar for alex55

i need to write a program that takes this style of input Enter customer name: Kristopher Ann#Nugent and seperates the name to look like this Customer name: Nugent, Kristopher Ann so far i have decided to separate the name into 3 separate character strings but i can only get two …

Member Avatar for alex55
0
224
Member Avatar for mitrious

I'm studyign the Accelerated C++ book and I have the MS visual studio 2008 here ... and I also have Ivor Horton's Beginning Visual C++ 2008 ... I was wondering if, after I finish reading Accelerated C++, it's a good idea to use the Ivor Horton's book ... anyone used …

0
56
Member Avatar for Tashgrl

Please guys, I have a problem here with a code to send data to a printer. Can you help out.

Member Avatar for Ancient Dragon
0
46
Member Avatar for fisch

Hello, it is necessary to create a callback function to handle the messages of an windows dialog box. The DialogBox() Function call requires a function pointer to this callback function. If I don't use classes my sample code works fine but when I try to encapsulate my code in classes …

Member Avatar for ashish.maske
0
1K
Member Avatar for keskor

Hello guys we've been given this project at skul to create a chess game using c++ , so what i have in mind now is as follows: i need to create different classes ,lyk i need a king,queen,horse and the other classes bt i don't know which one will be …

Member Avatar for csurfer
0
798
Member Avatar for Urv73

Hi!! I wanna convert a given amount of seconds into hours, minutes and seconds. I wanna use modulus to get the result I'm looking for. I KNOW that's it's easy but I'm stuck. How ever I turn it around I can't get it to work. Example... the time is 7500 …

Member Avatar for csurfer
0
127
Member Avatar for Lares007

Hi, I am currently working on an android application that requires interfacing with c/c++ libraries.So when i deploy my app on the device i get the message the application hellondk(the application name) has been forcefully closed. So when i go back and look at my code i see the in …

Member Avatar for Nick Evan
0
128
Member Avatar for timb89

I need to balance a binary tree which is in an array. [CODE]void balance(int lower, int upper) { int middle = (lower + upper)/2; cout << a[middle] << endl; if (middle!=lower) balance(lower, middle-1); if (middle!=upper) balance(middle+1, upper); }[/CODE] I've created the shell of the function just to get the idea …

0
94
Member Avatar for eri24

i'm new to c++, but am taking a intro to computer science class. we have to write a 2 player game. Game Rules: There are three stacks (A, B and C) of sticks on the table. Each stack is initialized with a random number of sticks between 3 and 10 …

Member Avatar for eme21
0
168
Member Avatar for Suzie999

Hi. I need to check a folder for the existance of a specific file extension. I've been successful checking for a full filename including extension, but Its just any instance of a filetype I'm after. My question is, Is there an existing method in a library anyone knows about that …

Member Avatar for Suzie999
0
88
Member Avatar for The physicist

Hi - I'm trying to get the filename and path of a file I'm opening with the OpenFileDialog in Visual C++. I can open and display the contents of the file OK, but I'm having problems accessing the filename and path, I guess they're stored in a structure somewhere? Code …

Member Avatar for The physicist
0
500
Member Avatar for seb00007

hi I need a program in C++ that returns the number by only integers; for exmaple if you input a numbre X= 43756, the program will show: 6 5 7 3 4 and it will also show the number: 4 3 7 5 6. Please someone help me

Member Avatar for myk45
0
97
Member Avatar for burcin erek

[CODE]#include <cstdlib> #include <iostream> #include <conio.h> using namespace std; void x(); void x(char); void x(char,int); void x(char,int,char); void x(int); void x(char); int main(int argc, char *argv[]) { x(); x('B'); x('E',30); x('B',30,'E'); x(10); x('V'); getch(); } void x() { for(int j=0;j<50;j++) cout << '*'; cout << endl; } void x(char xx) …

Member Avatar for burcin erek
0
111
Member Avatar for drummer123

This is Homework related. I've been struggling in this C++ class for some time now and my teacher basically hands us the book and says learn it and will not help or assist... and sometimes i can manage to get something that runs but this one takes the cake... i'm …

Member Avatar for Schol-R-LEA
0
125
Member Avatar for Metsuba

[CODE]using namespace std; #include <iostream> #include <fstream> #include <string> #include <cstring> int main() { ifstream InStream; string InFile; string InToken; cout << "Please enter the filename: " << endl; cin >> InFile; InStream.open( InFile.c_str(), ios::in ); if (InStream.fail()) { cerr << "Unable to open '" << InFile << "' for …

Member Avatar for Metsuba
0
73
Member Avatar for NV43

I'm having a few issues with my code and trying to figure out the last problems with it. It would be a great help if someone could look this over and guide me in the right direction. This program is basically supposed to take the entered date, and tell you …

Member Avatar for NV43
0
144
Member Avatar for Ana_Developer

I am using hash_map<string, Word *> dict to store my Word objects. Each Word is a class that inherits from my Node class. The value in the label variable in the Word class is read from a text file. Once I start adding the objects to the dict structure, I …

Member Avatar for Ana_Developer
0
221
Member Avatar for Talguy

Does anyone know of an web based programming utility where I can program C++ in a web page and have it compile on my remote server. I run an LAMP server

Member Avatar for Ancient Dragon
0
538
Member Avatar for chamnab
Member Avatar for alex55
0
149
Member Avatar for Nicko_FaTe_

I am trying to make a text based game for a university assignment, this is an extension of a game i coded previously, with a fhew improvements, i originally had it where you choose two potions, you mix them together, and give it to the princess, i now have to …

Member Avatar for Schol-R-LEA
0
212
Member Avatar for tKc

I have to write a program that reads a text file that contains +/- values and characters and outputs any invalid characters (anything that is not an +/- integer) and also at the end i have to have it print out the total number of how many invalid characters there …

Member Avatar for tKc
0
83
Member Avatar for themaestro

I'm doing a program on a quiz using DEV C++ and i want to set a countdown timer for it. As the user is doing the quiz, he's able to see the timer and once the timer reaches 0, the quiz automatically stops. Is is possible to do this? Thanks …

Member Avatar for Akill10
0
48
Member Avatar for vulcano224

I have to do a simple program for school I was wondering if anyone can please to help me. I already created the program but it is not working properly and I have no idea how to fix it. Everything looks fine to me Here's the assignment Write a program …

Member Avatar for griswolf
0
3K
Member Avatar for nerdygirl118

Function arguments and parameters are paired by name, therefore, names of corresponding arguments and parameters must be identical. Why is this statement false? Also, in cin.ignore (200, '\n'); why is the 200 there? what does it do?

Member Avatar for Ancient Dragon
0
87
Member Avatar for hasanzia

I am a beginner & I need to implement this program which states that I have to reverse whatever is given in input via pointers... For Example: i) Input: This is reverse order program Output: program order reverse is This ii) Input: This is exercise eight Output: eight exercise is …

Member Avatar for kes166
0
1K
Member Avatar for rico001

Hello I was trying to compile programs using DevC++ for Windows, (I also looked at WxDevC++) I can get generic console apps I made in C++ to compile under windows. What I want to be able to do is compile some opensource programs that use make to compile. When I …

Member Avatar for rico001
0
190
Member Avatar for crodriguez08

Hey there, I can't seem to figure out why i can't access the member '*next' from the Node class to the Shuffle function. Any help would be great. [CODE]/* llist.h * LList */ #include <iostream> #include <string> using namespace std; typedef string ElementType; class LList; class Node { protected: ElementType …

Member Avatar for hag++
0
206
Member Avatar for usustarr

I have following code that execute .ksh successfully. My issue is, after executing ksh script, it does not return to C++ program to do my print. Therefore "ksh was executed" never gets printed. Can someone please show me what I need to do to make program comes back after executing …

Member Avatar for gerard4143
0
178
Member Avatar for enja

i have to create a game using c++ language n i want to create something new...so i decide to create a games name "don't forget the lyric" which is the user need to fill in the blank on the lyric given. so, my question is how can i random the …

Member Avatar for enja
0
94

The End.