49,761 Topics

Member Avatar for
Member Avatar for fsloke

I doing assignment about file processing. It quite hard. 1.Sometimes can open the file sometimes cannot 2.How to overwrite y content in the file? 3. How to add Data into the file? Brief: You know I create the file then when I close the program. After that open again. It …

Member Avatar for Salem
0
323
Member Avatar for btech

I want to check to see if a binary tree is perfect. this means that the height of the left and right subtrees of the root are equal and the left and right subtrees of the root are perfectly balanced binary trees. I have written the function but am not …

Member Avatar for Salem
0
135
Member Avatar for MrBrilliant

my program prompt an integer input but if the user type in a character the program crash! is there any solution to the problem MANY THANX

Member Avatar for MrBrilliant
0
242
Member Avatar for JoBe

Hello ladies and gents, I just wanted to see what this small programs does so I tried it in Dev-C++ and in VC++ 2005, thing was, it worked in Dev-C++ but not in VC++ 2005 in which I got an error stating the following: [QUOTE]error C2664: 'MessageBoxW' : cannot convert …

Member Avatar for WolfPack
0
660
Member Avatar for coopedw

I know there are tons of posts on this, I think I'm on the right track with this, but I can't quite get it to work. I can't figure out how to get the range of primes to print. I'd appreciate any input I can get, sorry about the indenting. …

Member Avatar for bumsfeld
0
207
Member Avatar for JoBe

Hello ladies and gents, Ive downloaded the first four PSDK-FULL files and wanted to install these, but I don't know how exactly to do so. I tried to use winzip and extract them, but keep getting an error that says, failed to launch file: C\Documents and Settings\Johan Berntzen\Local Settings\Temp\install\setup\PSDK-x86.msi I …

Member Avatar for JoBe
0
183
Member Avatar for ray54

Help! I'm writing a program using Borland C++ Builder version 5.0 with a large number of ComboBoxes (about 120). I'm trying to use ComboBox in a "for" loop to set the ItemIndex of each box to the values in a specific array. Example Code: ... ... for (x=0;x<120;x++) { ComboBox[x]->ItemIndex=array[y]; …

Member Avatar for WolfPack
0
110
Member Avatar for lette

I've been working on this program all day and I'm so lost please help! I need to have a class that uses a 40 element array that has predicate function IsEqual, IsGreaterThan, etc and with member functions input, output, add, subtract. Is there anyway I can make this code smaller? …

Member Avatar for Bench
0
155
Member Avatar for comwizz

How are functions returning reference used?? Do they return values on the left side or the right side of the assignment. I would be glad if I could get some help. Thanks, comwizz.

Member Avatar for Bench
0
154
Member Avatar for tyczj

im trying to make a table using askii art thats changed when the dimensions of the array are changed. i have been playin it for like 2 hours and i cant figure it out, here is was i have so far. my definitions [CODE]#define M char (197); #define U_L char …

Member Avatar for tyczj
0
153
Member Avatar for Jon182

Hey guys, I am in the process of a program that counts integers I can do this by looking for the int keywork and then incrementing a variable although if an integers are implemented as: int j,k,l; I am not sure how to count this as 3 ints, I know …

Member Avatar for Jon182
0
448
Member Avatar for rgrwalker

This is what I have thus far. [code] # include <iostream> using namespace std; double miles( double miles, double gallons, double mpg); int main () { const int ARRAYSIZE = 10; // fixed array with 10 items double miles[ARRAYSIZE]={240.5, 300.0, 189.6, 310.6, 280.7, 216.9, 199.4, 160.3, 177.4, 192.3}; double gallons[ARRAYSIZE]={10.3, …

Member Avatar for Narue
0
84
Member Avatar for Whodey

OK well ive been trying to get this..and its just not working the way it should work.... :cry: The this is i got the cin in there...to put the input up in the code but it wont find where the addreess is....like i should be able to say...Erics address is?...and …

Member Avatar for Narue
0
95
Member Avatar for pit_bull

i have a computer science project for which i am recreatin the game of hangman as "classmate" here is my code the problem is that the correct guess of the name is not shown as "you won" somebody please run this code and help it is done in tc++ so …

Member Avatar for agiorgio
0
107
Member Avatar for Jon182

Hey guys, I have the following two pieces of code and I am trying to combine them so it will say if hello is found and it is at the start or the prevous character is whitespace then add one to the count but when i try to combine these …

Member Avatar for agiorgio
0
186
Member Avatar for Mac Paul

please send me a program of SRTF using c++, using linked list... i'm realy spending days trying to do it but i cant get it right so i need a basis for me to do it my own....

Member Avatar for agiorgio
0
109
Member Avatar for Kiba Ookami

I messed with C++ my first year in programming, and now as an AP student its all Java focused. As I want to be a game programmer I decided to get back to learning C++ because I've heard its often used. So, I downloaded Bloodshed Dev-C++, which was reccomended by …

Member Avatar for Narue
0
112
Member Avatar for brianotieno

#include<iostream.h> class rectangle { protected: int lenght,widht,height; public: rectangle(){lenght=0;widht=0;height=0;}; void seta(int lenghti); void setb(int widthi); void setc(int heighti); int getlenght(); int getwidth(); int getheight(); }; class box:protected rectangle { private: int length,width,height; public: rectangle(){length=0;width=0;height=0;}; void setlenght(int lenght); void setwidth(int width); void setheight(int height); int getlenght(); int getwidht(); int getArea(); int …

Member Avatar for dwks
0
137
Member Avatar for DotNetUser

I'm coding in VC++.net (managed C++). Is there a way to create dynamic arrays and preserving the data when the dimensions are changed? I know that Visual Basic can do this. In VB: ReDim Preserve mLn(UBound(mLn) + 1)

Member Avatar for dwks
0
59
Member Avatar for Whodey

ok im stuck here atm...what im trying to do is to have the program compile to run in windows..and i have to type in the name...and the program goes into the database and finds the address and puts it onto the screen...just like an address book.. So heres my code..anyone …

Member Avatar for Whodey
0
126
Member Avatar for caseg

my program runns but it isnt coming out right, i need to have on the left side my input*.01*cash and on the right side the chas sequencing 1-20 the problem is the cash numbers are counting more than once before going on to the next number for example: 1 1 …

Member Avatar for Whodey
0
143
Member Avatar for smartravi

Hai I am new to VC++ and I am having x.dll which is developed in c#.NET . It consists of one interface and other classes. In that interface data member ( constants) defined and some funtion(method) definitions are there. Now I have developed an application in VC++ for that i …

0
69
Member Avatar for caseg

hi, i can figure out why this program keeps counting up the cash variable more than once when i run it, like it'll be 10 10 10 10 10 11 11 11 11 11 and the percentage numbers have the letter "e" at the end of each percentage... just seeing …

Member Avatar for Bench
0
103
Member Avatar for robase

I have an Amusement Park Problem in C++ > Category > Children > Price $2.00 > The first child is always free > Category > Youth > Price > $8.50 > For every 4 tickets in this group one person is free. > Buy 4,get one free > Category > …

Member Avatar for Bench
0
692
Member Avatar for candykane69

> Write a C++ program having a recursive function recursiveMinimum that takes an integer array and the array size as arguments and returns the smallest element of the array. The function should stop processing and return when it receives an array of 1 element. #include <iostream> int recursiveMinimum(int[], int); int …

Member Avatar for candykane69
0
93
Member Avatar for tyczj

im not sure how to write an assignment operator for a 3d array this is what i have bit i know its wrong [CODE]Cells& Cells::operator= (const Cells& cells) { resetSize(cells.DEPTH, cells.ROW, cells.COL); for(int d=0; d<DEPTH; d++) for(int r=0; r<ROW; r++) array[d][r] = **this for(int c=0; c<COL; c++) array[d][r][c] = cells.array[d][r][c]; …

Member Avatar for tyczj
0
166
Member Avatar for Mike182

Id like someone to take a look at this piece of code and tell me any errors to correct, ms-vc++ 6.0 says there are 3, but when I correct them it creates more errors (example being: going from 3 errors to 18 with one ';' going in) Help appreciated. Here …

Member Avatar for Ancient Dragon
0
330
Member Avatar for bg123

I have a program where the user enters a number and it prints all the prime numbers between 1 and that number. I have been able to do that. It must also print the max prime number, the greatest prime between 1 and that number. This is where I am …

Member Avatar for WolfPack
0
127
Member Avatar for javamum

This is the first program I am writing after taking one C++ class 4 years back. Please help me with this syntax error: #include <iostream> #include <math.h> using namespace std; enum run {TERMINATE=0, LOOP, NoRoot}; double f (double x); double f (double k); double f (double n); return (x*(1 + …

Member Avatar for javamum
0
96
Member Avatar for kryptolite

i'm trying to make a hangman game with c++ right now and i got a question: how do you get a RANDOM word from a text file? given there is only a word each line in that file e.g: television computer football butterfly etc. anyone can help? thx.

Member Avatar for AhmedHan
0
198

The End.