49,761 Topics

Member Avatar for
Member Avatar for jer_stud56

I'm writing a program to input a file called customers and output it as bills, but I'm not sure how to use ifstream. I've searched for quite a while and haven't really found anything useful. I'm probably doing it wrong though. Still new at this. [code] #include <iostream> #include <iomanip> …

Member Avatar for mitrmkar
0
597
Member Avatar for knight fyre

I'm trying to write a program with a has-a relationship but the initialization isn't working. The error I'm getting is: [QUOTE] h:\oop labs\license retry\license2.0\license2.0\licenses.cpp(15) : error C2275: 'Date' : illegal use of this type as an expression[/QUOTE] [CODE=cplusplus]Licenses::Licenses(int id, string name, string ad, Date, Date) :issue_date(Date), expiry_date(Date) // error occurs …

Member Avatar for knight fyre
0
134
Member Avatar for flash121

Hello, There's probably a very simple solution to this but i'm having some trouble figuring it out. How do i enter X numbers into an array without using "enter" after each input ? I'd like to separate them with spaces. For example: int array[5]; when i'd enter numbers into it, …

Member Avatar for flash121
0
83
Member Avatar for DJJazzyJim

Can anyone please point me in the direction of a tutorial on parsing a binary file and extracting data. I want to search for file headers in Hex and export the files. Thanks

Member Avatar for katisss
0
156
Member Avatar for nelledawg

Hi guys, ok so I'm trying to figure this thing with functions out and I've been sitting here for seriously 6 hours with half of it done. I am so confused, please help! The program is to track the amount and price of raffle tickets sold, and then add to …

Member Avatar for nelledawg
0
283
Member Avatar for buddha527

Last week I had to make a dice rolling program that uses a one demensional array that stores and displays the number of times each sum of two dice appear. I completed this code with little effort. But this week we have to modify the code so that instead of …

Member Avatar for buddha527
0
431
Member Avatar for jer_stud56

Everything compiles, but after I input I just get an infinite loop. Is there something I can do differently to make it not loop? [code] #include <iostream> #include <iomanip> #include <string> using namespace std; // Program Description // This program will calculate test results for // a set of test …

Member Avatar for jer_stud56
0
85
Member Avatar for Unshod

Hey guys and girls! My name is Dave Traeger, and im currently looking for some code help with my mod Arcadium for the Source Engine. Currently the project is going under a few changes and the name is included (originally it was called Gauntlet). Arcadium aims to bring back the …

0
72
Member Avatar for atish00

[QUOTE]char str[] = "SACRED"; strcpy( &str[2], &str[3]);[/QUOTE] what the single & do ?? is it a typo of && ?? and what bout the other elements ?? won't the str[3] be repeater teice i.e SARRED ?

Member Avatar for Dave Sinkula
0
136
Member Avatar for Jennifer84

Sometimes when I run my program, it comes up an Error DialogBox that says. "Unhandled Exception" In this messagebox, there is info about something called JIT Debugging. It also says that it is possible to Turn JIT-Debugging off so some system file on the computer will take care of this …

Member Avatar for vijayan121
0
75
Member Avatar for Infeligo

Hello to everybody. I am simulating a tree without a recursion, that is I have an array of leaf nodes and I want to go one level deeper. I wrote the following code: [CODE] #include <iostream> using namespace std; int main() { int* row; int root_row[1]; int row_size = 1; …

Member Avatar for vijayan121
0
217
Member Avatar for henpecked1

I have been given an assignment to construct a program that reads in temperatures every hour for 24 hours, find lowest, highest, and average, then output the temps in a tabulated form. I'm semi-sure I can manage the computational and display part, but I am at a loss as to …

Member Avatar for henpecked1
0
221
Member Avatar for Max_Payne
Member Avatar for beefstick720
0
134
Member Avatar for daviddoria

Is it possible to make a function with an unknown number of parameters without knowing ANY of them? ie. void Test(...) I know you could do void Test(va_alist) with varargs.h, doesn't make sense that this functionality has been removed does it? Thanks! Dave

Member Avatar for Ancient Dragon
0
91
Member Avatar for Spencicle

Sorry for the 2nd post but I thought it might be seen better than if it was in my other post, which btw, thanks everyone in there for helping me. The second program i have to write is about the user inputing their annual interest rate, current balance, and amount …

Member Avatar for plgriffith
0
89
Member Avatar for Spencicle

You have just purchased a stereo system that cost $1000 on the following credit plan: No down payment, an interest rate of 18% per year (and hence 1.5% per month), and monthly payments of $50. The monthly payment of $50 is used to pay the interest and whatever is left …

Member Avatar for superjacent
0
1K
Member Avatar for Robb@W

Hi, I've recently started learning C++ and though I have been sticking to command line stuff so far, would now like to have a play with the IDEs I've downloaded, Dev-C++ and the Microsoft stuff. When I installed Visual C++ 2005 Express edition a while back, I must have set …

Member Avatar for Robb@W
0
109
Member Avatar for teddyzhai

Hi, there: I'm recently working on parsing xml file in c++. i have googled sort of libraries. just dont which one is better. Could someone who has experience say sth. about it. I mean, "right" easy to learn, light -weight... 3ks Regard Teddy

Member Avatar for teddyzhai
0
159
Member Avatar for Jennifer84

I have a Form application. From Form1 I open Form3. On Form3 I have a button that consists of 20 pages of code. (The code reads .txt files store values into vectors) 9/10 Times when pressing this button the program function perfectly but 1/10 times I run the program, an …

Member Avatar for Jennifer84
0
177
Member Avatar for monkey_boy_401

Hi, I am new to using dev. C++ and i was wondering if anyone could help me start writing the code. I know how to open up a new project but thats about it. Please help me?

Member Avatar for morb
0
106
Member Avatar for nelledawg

Hi everyone, I'm new to the forums and having a problem that I can't seem to fix, so it would be great if someone could help me out! Everything in the following code works except for the while loop. When it gets to the "Input another product? (y/n) :" line, …

Member Avatar for nelledawg
0
164
Member Avatar for Metalsiege

Trying to have a user input their grades as letter values and then assigning the letters numbers to be saved in an array. For some reason I can't get case 1 to work correctly. All it does is ask for the lab and then the grade, but once you input …

Member Avatar for Metalsiege
0
188
Member Avatar for sonygamer

Hello again everyone. I've been trying to finish this code that calculates the eigen digit (i.e. 2349 is 2+3+4+9=18=1+8=9. It wont give me a single answer though. And we are supposed to do it through a recursive function. The code looks like this: [code=c++] #include <iostream> using namespace std; int …

Member Avatar for Lerner
0
329
Member Avatar for iwilcox

Alright, so I am trying to create a program that will take a [m][n] Matrix and multiply it by a [n][p] Matrix, filling each matrix with increasing values. I am having a problem with my function, prototype, and call. I keep getting the "...not declared in this scope" error and …

Member Avatar for VernonDozier
0
150
Member Avatar for suresh1010

can u please temme the string funtion which will eliminate the character in the desired position in C++. ie in (string.h) example i need to remove the 4th character in "SACRED" so the resultant array must be "SACED" without a blank space in the deleted postion. so the size gets …

Member Avatar for Ancient Dragon
0
177
Member Avatar for jimps

Hey, I'm not sure how to do this. I know how to convert a char into an int, getting the ascii value, or the numeric value, but that's not what I want to do. Basically I have a CHAR, I give it a value, usually a short sentence, then I …

Member Avatar for atish00
0
84
Member Avatar for deactivated

Hey everyone Maybe someone can help me with this. We are supposed to create a program that will read a .dat file and then output a new file containing the total number of rows in the data file, the sum of integers and the number of occurrences of the number …

Member Avatar for plgriffith
0
88
Member Avatar for johnqsmith

Problem background: gcc v 4.1 2 .cpp files, 2 .h files Files: main.cpp a.cpp a.h b.h Organization: main.cpp includes a.h (because it calls a.cpp code) a.cpp includes a.h a.h includes b.h (because a class in a.h uses a b.h class) There is no inheritance between a.h or b.h or any …

Member Avatar for Ancient Dragon
0
186
Member Avatar for Run.[it]

In class weve been shown how to read from a binary file and read from a text file but Im unsure how to write text to a binary file? Heres my attempt so far, Can you help? [CODE] #include <iostream> #include <stdio.h> using namespace std; int main() { FILE *namefile …

Member Avatar for Run.[it]
0
204
Member Avatar for s_mostafa_h

hi All can anybody introduce a good cds Training C++ . CDS Training sometimes can be good for taking some tips... rgds

0
59

The End.