General C++ Programming - December 2012 (Page 27)

Segmentation error, why?
 
Here's a code I used to describe the class of binary trees with char elements. struct node { char d; node *ls; node *rs; }; ///// class btree { pub...
[5 replies] Last: I'm pretty sure ne555's first reply may have nailed the issue: You'l... (by Disch)
by capet
Math Quiz program
 
So I am making the program little by little to eventually make it more complex. What I am having trouble with is the logic behind my while loop for looping the...
[5 replies] Last: Something like this would be the simplest: int denominator = a_rando... (by JLBorges)
Quicksort for pointers
 
Hi! Well, I'm making a program that is kind of big, and at a point I have to use a sort algorithm to make a list I have be on decreasing order. I can use any ki...
[no replies]
Arrow Driven Menu - CLR
 
I have been trying to figure out the best way to get a menu working with the arrow keys. For example: --> Start Game ......Options ......End Game I want the us...
[no replies]
by Ikaros
Fast way to evaluate a function
 
What is a fast way to evaluate function. Now, I am evaluating a function using for-loop and vectors. For example, void evaluate(std::vector <double>& f,...
[no replies]
by sabi20
Initializing class member variables
 
what does these instructions mean when it says "initialize pi with the value 3.14" ..... how can i initialize that variable? The instructions don't list any fun...
[3 replies] Last: To repeat http://www.cplusplus.com/forum/general/87622/#msg470047 st... (by JLBorges)
Overloading operator: Matrix Addition
 
Hi Everyone, First post, I'm trying to set up my functions and perform some operation overloading so that I can +,-,==,!=,* two matricies. I have encountered...
[3 replies] Last: Ahhhhhhh I see, I will try that now, so I need; matrix operator=(cons... (by NytramZ)
by Juanx
Text Based Game with Clases Proyect
 
Hi guys ! I'm trying to do a zombies text based game, my problem comes because at the moment I have implemented nearly all myfunctions in my main, and I want...
[no replies]
by areej
my project (1,2)
 
hi how are you all that my project in my unversty can any one help me ^_^ Project Title: Company System Program Consider a company system which has a menu ...
[20 replies] Last: @JM Yes. (by TheIdeasMan)
Are these functions correct for the following program?
 
The local baseball team is computerizing its records. Write a program that computes batting averages and other statistics. There are 20 players on the team, id...
[1 reply] : Here is my solution: #include <fstream> #include <iostream> #include... (by andy2012)
Is it bad or good programming practice to update private variables by passing references to objects to other functions???
 
I tried updating a private var via inheritance using a setter from the base class but it did not work. Here is the setter: /**/void MovingThePlayer::Set...
[9 replies] Last: Thanks (by dtaqee88)
Display output problem
 
Here's my problem, I cant seem to display the output. For the output we were supposed to display Item name and the Profit for each corresponding item. This is ...
[2 replies] Last: I tried your code, but it seems like the last code got an error. If I ... (by blaxroze)
Issue with sendto() in socket programming
 
I have been working on a udp flooder program and I have reached the point where I need to call sendto(). When I run the program the function returns an error, I...
[no replies]
by aj3423
generate random int using c++0x <random>
 
#include <random> int main() { mt19937 rng1; // default_random_engine rng2; uniform_int_distribution<int> distribution(1,100); cout << distributio...
[3 replies] Last: Pure C++11: #include <random> #include <chrono> int main() { st... (by JLBorges)
Help with VS2012 Debugger, and char pointer arrays too?
 
Hey guys, thanks for reading. I need to sort an array of char pointers, and I'm using quick sort to do so. One part of quick sort is swapping elements, and s...
[no replies]
MultiThreaded Server
 
Hello rrybody, Im trying to create a server that handles more than one client at a time. It allows a client to connect and the client receives the message the ...
[no replies]
by sabi20
creating a circle class and initializing the private member?
 
Are you allowed to initialize the private members in the class directly like i did below? ............. because i thought the nothing is created in memory until...
[1 reply] : > because i thought the nothing is created in memory until you create ... (by JLBorges)
Problem with cin >>
 
I am writing a UDP flooder program in an attempt to get better with socket programming. Everything has gone well so far except for some reason this piece of cod...
[no replies]
by HJH
tree volume
 
My code is not compiling. I need some assistance.Below is instructions for a tree volume program. You have been contracted by Adcock Forest Products to produ...
[1 reply] : Put your code in Code Marks. (by closed account N36fSL3A)
Why do i need to use cin.get twice?
 
Hey guys, i was writing a very simple program and came a across an problem. In order to stop my program from closing i had to use cin.get () twice? Is this norm...
[1 reply] : I tried you program and it seems you are right. Then, I did: char c... (by Aikon)
December 2012 Pages: 1... 2526272829... 43
  Archived months: [nov2012] [jan2013]

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