Beginners - December 2009 (Page 18)

by sparky
SIGSEGV, Segmentation fault error
 
Hello, I am trying to create a graph but I get the following error when debugging my program using Code::Blocks (please see below). Any assistance will be ap...
[10 replies] Last: guestgulkan, It worked and I cannot thank you enough! I changed ... (by sparky)
Loop function
 
int a Function (int j, int& k) { do { j++; k-=2; } while (j <= k); return j; } What is the output of the following code fra...
[7 replies] Last: Not to sure. I believe in x = aFunction(3, 8); // y = 8 remains unc... (by makan007)
EVT_BUTTON
 
im fairly new to wxWidgets and i am making a frame that has 3 buttons and each button is supposed to change the color of my rectangle but they are not. the rec...
[1 reply] : I suggest the wxWidgets fora. http://forums.wxwidgets.org/ (by helios)
searching sentence for word
 
As the title states, I am attempting to write a program that searches a sentence for a word and then outputs the location of that word, which I will do in the m...
[7 replies] Last: thanks.......back to the drawing board. (by butterflyze)
Vector of class objects
 
I am having trouble getting this code to work and I cannot figure out for the life of me what is wrong. I am getting no error messages, just when I run, it gets...
[11 replies] Last: Okay after hours of changing trying different things I figured it out.... (by cbouwkamp)
Having trouble finding the average
 
I'm nearly done finishing my code but the average is wrong.It keeps selecting 77 the last number in line for it's average here's my code.I'm not sure what funct...
[2 replies] Last: thanks that helped out alot. (by halestorm222)
floating point rounding errors
 
I can't explain this: #include <cmath> #include <iostream> using namespace std; int main() { // n double n = log(125)/log(5); // n2...
[2 replies] Last: Floating point math is an approximation. Read sectsion 29.18: http... (by Disch)
Strings Being Displayed as Asian
 
~ This may or may not be a compiler-specific problem; I think it is though, so can anyone who is familiar with Microsoft Visual C++ Express 2008 help me out? ...
[3 replies] Last: Ah, I had tried using _T() but it didn't work. I recall seeing it use... (by KaidzAccount)
by j3tt
generating six random lottery numbers using rand() and one dimensional array
 
Where am i going wrong here? //Ch11AppE08 //generates and displays six unique random numbers for a lottery game. //each lottery number can range from 1 ...
[4 replies] Last: mybad... fixed, but as you can see from my example you will want to ei... (by gcampton)
Validate logic on if-then structure
 
I'm trying to test the logic for an assignment, but I'm not sure if what I have will work. I have declared float variables, but in the actual program it will b...
[7 replies] Last: check the string class, on this website and you should get a good idea... (by gcampton)
programming problems
 
Hello All - I am teaching myself C++. I have followed the basics. Declarations of the int Main control mechanisms (if statement, loops, case switch) I ...
[5 replies] Last: Here's one I just did, I had some problem with parsing command line ar... (by gcampton)
by j3tt
Using arrays in a grading program
 
I need it to display the number of students earning the entered score. where am i going wrong? //Ch11AppE06.cpp //Displays the number of students earning a s...
[1 reply] : oops if (scores != searchFor) changed to if (scores == sear... (by j3tt)
by ARWA
how 2 find the angle in the c++ coad?
 
hi, i want 2 calculate the angle pettween 3 potential sides by this formula fabs( (slope2-slope1)/(1 + slope11*slope2)) ; so , what i want is the angle ...
[1 reply] : her is my program the question ask to read 3 points from a file an... (by ARWA)
How to read binary file with numbers and text
 
Hello, I have a binary file of this format: 1st 2 bytes = total number of entries (This appears only once at the file beginning) Then each record is of...
[2 replies] Last: Problem solved, thanks a lot (by greko2009)
How to output functions involving operations on huge arrays
 
Hi, i am working on an assignment that requires me to use a two-dimensional double array with 400 values in the 1st dimension, and 10000 values for each of thos...
[4 replies] Last: I would do it like that, yes. As for passing as a parameter; it's a... (by chrisname)
passing a vector of structs
 
Hello, I'm having problems passing a vector of structs to a function. What I'm trying to do is create a program that implements of a vector of structs which hol...
[1 reply] : Please don't double post: http://www.cplusplus.com/forum/general/17072... (by Bazzy)
how do you ascend/descend strings? any errors?
 
I have been having a huge amount of difficulty in C, when in C++ it is much simpler to sort out the program. here is my algorithm: #include <stdio.h> #define...
[4 replies] Last: owh i c thank you, and sorry .. perhaps an error with me and my c free... (by evatest01)
parameter error
 
im working in class and trying to open and print out from a file heres the error im getting game.cpp: In member function âbool Game::Fill(std::string)â: g...
[5 replies] Last: it was a case example.... not much of an example of camel case if I o... (by gcampton)
pointers
 
hi, right now im stuck on pointers, i somewhat get how to use them, but i dont really know what use they have in actuall programs. i was wondering if someone co...
[1 reply] : Some things of the top of my head: they can be used in classes to refe... (by Zhuge)
value of (int) casted double differs from the same value assigned to an integer
 
Hi, well, the problem is not very easy to describe. Afaik, if you assign a double precision value to an integer it should be rounded down to it's closest integ...
[4 replies] Last: Just installed and tried the Intel C++ compiler and there are no issue... (by momesana)
December 2009 Pages: 1... 1617181920... 23
  Archived months: [nov2009] [jan2010]

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