Beginners - November 2009 (Page 9)

Floating point exception
 
My compiler, XCode, gave me the message "Floating point exception," after going through the my code below, then ended the program abruptly. It goes through o...
[2 replies] Last: What's in FindColor ? (by Bazzy)
Can member functions be used as comparator functions for STL algorithms?
 
if so, how does one go about doing it?
[3 replies] Last: If you don't pass anything it will be taken for default from htt... (by Bazzy)
Find numbers in a text file.
 
Hi, I want to filter out numbers from text rows in a textfile. But can't find a way to do it. Do you guys have an idea? Right now I have a code that just printi...
[1 reply] : Hi! I wrote a code but it has a handicap: if a word start number an... (by screw)
No output for some reason?
 
I have this program with a vector group of class objects. It does not seem to want to output for some reason so here are the 2 pages of my code that the problem...
[3 replies] Last: your iterator and overloaded operator look ok. you may want to dire... (by herbert1910)
Trouble with code
 
Please can someone tell me where do I go wrong with this code it won't run. //***************************************************************************** ...
[1 reply] : What isn't working? (by firedraco)
by j3tt
getting an average of 3 numbers using functions
 
Okay. Everything in this works except for the calculation of the average. //calculate the average of three test scores //jett #include <iostream> #include ...
[5 replies] Last: still, getTestScore() does not add any value to your program except in... (by joeriMJ)
by XanT
Function specialization
 
I have tried everything and can not get this to work. #include "stdafx.h" template <class T> T max5(T *max_val, int elem_num); //template <> char * ma...
[5 replies] Last: Okay help I got from someone else told me to change the template <... (by XanT)
any network library for c++ that is OS independent?
 
etc, it works on windows, linux and mac os as opposed to using the api of the os directly hence reducing portability
[2 replies] Last: There are atleast 100 posts in the forum for this question. (by writetonsharma)
by j3tt
debugging a mpg calcuator
 
I have trouble pinpointing the what causes an endless loop. //Ch9AppE07.cpp //Calculates and displays the miles per gallon //Created/revised by <Jett Bail...
[7 replies] Last: It is still 0.0 when you pass it to the function, since you never actu... (by firedraco)
by buggy
writing separate channels using libsndfile
 
Hi- I'm really new to c+ (this is day two) and I'm trying to write a program that will allow me to write audio data from a wave file into two arrays for the ...
[no replies]
Change condition
 
How would you do something like this: if ( bool_a ) { a = condition; } else { a = !condition; } if ( a ) { ... }
[8 replies] Last: You would need a logical nxor to have a single cout eg: bool nxor (... (by Bazzy)
keeps getting error
 
i want my zero_zero to minus the shifted_table and display out at the int main. but i keep getting error.can anybody tell me what is mistake? #include <iost...
[1 reply] : Don't double thread: http://www.cplusplus.com/forum/beginner/16500/ (by Bazzy)
Exiting a loop using a specific character.
 
I'm trying to write a little program that allows you to enter a couple integer values, print them to the screen, and continue indefinitely. To exit the program,...
[6 replies] Last: I always prefer to avoid "signal" characters. When the user is done, m... (by Duthomhas)
reading from files
 
In my program so far, i call a function to generate 100 pairs of random numbers, i then send it to a file with two numbers on one time, meaning i have 100 lines...
[2 replies] Last: for the greatest common divisor, check out the euclidean algorithm. It... (by joeriMJ)
Reading Integers From *.Txt Files
 
I am trying to create a simple text-based game with highscores, and I am having trouble reading integers from a text files. I use fstream score("highscore.t...
[2 replies] Last: you could try saving the "highscore" in highscore.txt this way 130... (by ragnamanga)
by KezRst
Error in closing win32 application
 
Hello! I've continued to work on a text based RPG I've been making progress on just for practice. I've come up with this problem though that I have searched...
[5 replies] Last: great. in most of the cases its the destructor who is the culprit whe... (by writetonsharma)
by luvsom
functions-grades and calcs
 
Ok so I had to make this program that takes an array of test scores and calcs the class avg and then outputs the avg and how many letter grades there were. Now ...
[3 replies] Last: Use int main() . To fix your errors, you need to call the function... (by firedraco)
by one nz
Undefined symbol 'cout' in function main ()
 
Hello, As you could probably guess I am new to C++ programming. I have a very simple problem that I i tried to look up. My problem is: when i try to compile ...
[14 replies] Last: sorry zhuge I didn't read your original post properly. (by gcampton)
Having Problem with Vectors
 
I need to create a vector of class objects. I know that is done similarly to this: class application{ string s; vector<account> accounts; for(;;){ (Imagi...
[4 replies] Last: This has been driving me nuts for hours so any help at all? (by cbouwkamp)
Pseudo Code
 
*****************
[1 reply] : Pseudo code is a mix of English and code. I'm seeing a lot of English ... (by joeriMJ)
November 2009 Pages: 1... 7891011... 25
  Archived months: [oct2009] [dec2009]

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