49,761 Topics
| |
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 … | |
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 … | |
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 | |
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 … | |
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. … | |
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 … | |
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]; … | |
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? … | |
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. | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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.... | |
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 … | |
#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 … | |
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) | |
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 … | |
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 … | |
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 … | |
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 … | |
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 > … | |
> 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 … | |
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]; … | |
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 … | |
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 … | |
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 + … | |
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. |
The End.