General C++ Programming - October 2012 (Page 13)

Reading integers form a .txt file
 
I need to get even integers from a txt file. How is that done? I'm new on here int main() { ifstream fin; ofstream fout; int integer; fout.clear()...
[1 reply] : Is there supposed to be a question here? (by Zhuge)
POINTS ON A PLANE
 
Hey Guys, I need help writing a code that will allow me to take in x and y coordinates and display the points on a plane. I need some advice. I am trying to...
[4 replies] Last: Try reworking your code so you use two nested for loops -- for the x a... (by andywestken)
Removing vector elements?
 
Hey guys, how can I remove (duplicate) vector elements using only .size(), .pop_back(), and .push_back, and without using a second vector? an example of ...
[1 reply] : > without using a second vector? I suppose that means in O(1) size - ... (by JLBorges)
by poknat
Help on filestream
 
This is the same cashier problem i posted but our professor included filestream problem. here's the question: Cashier 1.0 is a C++ program that displays on t...
[7 replies] Last: "Finally, it sends the total amount due, amount tendered and the chang... (by poknat)
Getting an infinite loop when allocating memory
 
I am creating a program to calculate and display call statistics. When the default constructor is called and it goes to allocate memory for an array for the cal...
[4 replies] Last: I figured it out. I created another class in the same header file with... (by NostawTtam)
Operator Overloading Problem
 
I have overloaded the operator + to add two objects of the class I have created. This is the snippet of the code I have written // friend Polynomial...
[1 reply] : Did you initialize the members array in the constructor? (by pogrady)
passing adresses in functions
 
Heres sample code: static vector<string> default_vs; string default_s = string(); int blablabla(string bla = "", vector<string>& blabla = default_vs, string&...
[6 replies] Last: You have to include the header declaring the function (along with the ... (by andywestken)
A practical case for vectors in a class
 
Hi everyone. I am doing a simulation with firm dynamics. Each firm has some attributes. Firms are born or dead each year. I am trying to create a class of firm ...
[19 replies] Last: Thanks! That was very clear! (by dekeenfrance)
Building PODOFO, MingW, WinXP?
 
The instructions provided in the PODOFO readme file indicate that I need to enter the following command prompt to build podofo (this is prior to installing). ...
[4 replies] Last: Thanks guestgulkan.. Great answer. I've just learned something else v... (by dominover)
error header "Tserial.h"
 
i write the code bellow but the Tserial.h is error. the message like this. " cannot open include file "Tserial.h: no such file or directory file. " i come f...
[5 replies] Last: I use OpenCV. and I've added a tserial header file into it. but no cha... (by nizardeh)
my code won't let me move on when I input data
 
Here is my code: http://pastebin.com/raw.php?i=nEcPcQZY When I input data, it won't let me add more lines. It is in a loop so it should read multiple line...
[no replies]
by AnaDC
2D Plot (CImg)
 
I'm using Visual Studio C++ 2008, and I'm wondering what it would take to plot data points (the x-axis will increment time at a constant rate, the y-axis contai...
[8 replies] Last: Final update: The deadline for this has already past, but I wanted to ... (by AnaDC)
Building wxWidgets with MinGW (1,2,3,4)
 
I'm having a whole lot of problems trying to build wxWidgets. I followed the directions step by step. instructions from http://wiki.codeblocks.org/index.php?t...
[71 replies] Last: I was able to build wx statically using these instructions http://wiki... (by naraku9333)
by Ginro
HELP with program
 
I have NO clue what i am doing in C++ because i learned java. the program has to put out a file in the following format: Community Hospital Billing Statement...
[17 replies] Last: float t, tp, vp, d, rp, rc; char rm, ts, tv, tc, vc; cout << "\nWa... (by TheIdeasMan)
Code::Blocks+wxWidgets: Building the library
 
These are the errors I get when trying to compile a wxSmith/Widgets project using codeblocks: C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud....
[7 replies] Last: Is there somthing I have to do with Code::Blocks to get it to work wit... (by IWishIKnew)
by amguy
Using same input (cin) for multiple loops help please.
 
Hi. I'm making a program that finds the multiple things about an inputted number. So say I enter 1221 My program will say that it's 4 digits-> then it says t...
[2 replies] Last: If you are modifying to original number, then don't (or save a copy) (by ne555)
function help
 
I'm trying to write a function to print out a subtotal but i can't seem to get it working please any advice would help. This is basically a calculator program t...
[2 replies] Last: But my function subtotal doesn't even work. Am i passing the arg corre... (by lazyman)
Program Help - Reading Data From .txt File
 
Can someone please assist? I need to read the sample data values below and produce the output at the bottom of this post. When executing the program the data re...
[2 replies] Last: I understand! Thank you so much Moschops ! :-) (by aliciamyers17)
Program Help - Trying to read an input file and calculate course grades
 
Hello Programmers! I really need somebody's help, I am in an intro to C++ class and I am having a hard time getting my program to execute. I have to create ...
[1 reply] : One thread per question, please: http://www.cplusplus.com/forum/gener... (by Moschops)
Fibonacci Iterative and Recursive Algorithms
 
Write a program that neatly displays the first 21 numbers in the Fibonacci sequence in a table. Recall the definition for the Fibonacci sequence: F0 = 0 F...
[1 reply] : "Us" is who?! Here are 20 fibonacci numbers 0 1 1 2 3 5 8 13 21 34 ... (by vlad from moscow)
October 2012 Pages: 1... 1112131415... 50
  Archived months: [sep2012] [nov2012]

This is an archived page. To post a new message, go to the current page.