49,761 Topics
| |
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> … | |
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 … | |
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, … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 ? | |
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 … | |
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; … | |
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 … | |
Does anyone know where can i get the game engine: LlamaWorks2D ? | |
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 | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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? | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
hi All can anybody introduce a good cds Training C++ . CDS Training sometimes can be good for taking some tips... rgds |
The End.