General C++ Programming - April 2014 (Page 29)

by MzDoll
BMR Calculations
 
I'm having problems with this BMR program. It isn't running as well as I thought it would. Can someone help me? This is what I have so far //declare a varia...
[12 replies] Last: Thank you so much you guys. I got it to work with your help //declare... (by MzDoll)
Code review for: Empty Base Optimization pair (similar to boost::compressed_pair)
 
I have tried to implement a much simplified version of boost::compressed_pair . What follows is a partially specialized EBO_pair<T1, T2> class template, wri...
[10 replies] Last: Something like this, perhaps: #include <utility> #include <tuple> #i... (by JLBorges)
by helnow
Sorting
 
I am doing heap sort i start from generating rand array, then heapify it, then sort it using heap method. the heapify works fine. but on the heap sort, after i...
[5 replies] Last: Sort of. You need to revisit the logic of your sink function. The ar... (by Duthomhas)
C++ book recommendation
 
Hi, I am new to C++. I would like to purchase the best book for self-study. I have been able to code a small program that charges amount 1 for the first 100 km ...
[1 reply] : http://stackoverflow.com/a/388282/1959975 (by LB)
Help - multicast with ENET library
 
Hello, I am on a research project where I want to compare a game on a server-client enviroment and distributed enviroment (as bitorrent). I have made the gam...
[no replies]
Recursion Help
 
I do not understand how to complete this code can anyone help me? Thanks in advance. // STEP 1: // Complete the following function as a recursive funct...
[2 replies] Last: Thank you that helped a lot, I didn't understand what a recursive func... (by torn3168)
C++ API STOCKS
 
What is the code to pull up a stock ticker and get information like last price and volume? IN C++ somebody gave me the is link https://developer.yahoo.com/yql/c...
[no replies]
Dev-C++ compiler question
 
Hi, I am a new tutor for a college CIS department & just came back to C++ after 10+ years. I am trying to tutor students using the Dev-C++ compiler for very ba...
[7 replies] Last: NT3-Sorry for the delay in responding. I honestly though I had, but I ... (by noobtutor)
by m33tz
Simple AI
 
I'm having some problems with implementing an AI. It should be just a simple AI that follows player. Here is the code that I got so far: (float)Directio...
[3 replies] Last: Try working it out with trigonometry. Unfortunately I don't have exper... (by LB)
Min/Max, Mean, Variance
 
Im completely stuck on this project. My professor is making us use his variables and it's really confusing. We have to declare an array MAXSIZE that can hold 10...
[5 replies] Last: http://stackoverflow.com/q/5837639/1959975 http://stackoverflow.com/q/... (by LB)
how do I declare a whole program "int" from the begining
 
so I'm supposed to write a function for all of these but the last part will not compile. Any help would be appreciated //notes // void hello(); // void he...
[3 replies] Last: I also see that you have int main() twice. That's certainly an issu... (by Stewbond)
Is my zalloc (zero registered malloc) library bulletproof?
 
I've written my own allocation library, which I use within my emulator. It basically is a library made arround the malloc&free functions, with registration of a...
[14 replies] Last: If you use modern C++ practices such as using the smart pointer wrappe... (by LB)
by chucho
help with PRINT TREE function in optimal binary search tree program
 
here is my code, without the print tree functions i can get the table and root table fine, I don't know why i'm getting this error though, any ideas? breaks ...
[3 replies] Last: also, can you check the print tree function. When i comment out everyt... (by chucho)
by kabary
Brovuka's algorithm
 
i am trying to implement brovukas algorithm to find the minimum spanning tree of a graph but my program crashes in the find function when i run it http://pas...
[1 reply] : That kind of error is usually caused by stepping out of bounds of an a... (by Mats)
Function breaks program after it is successfully ran
 
Need any of you fine gentlemen to help me figure out why this is breaking. I'm working on a networking framework. Link To DL Framework: http://www.planetchil...
[5 replies] Last: Never use memcpy or similar on non-POD types. (by LB)
WIN32 Api in C++ Questions.
 
Hello and Good afternoon everyone, Looking at WIN32Api i am most pleased to work on it especially in c++, so today i wanted to look at developing application...
[4 replies] Last: okay, i fixed that issue, all buttons are working fine. but i have an... (by m0mathur)
by Esk
C++ class variable resetting
 
I am creating a SpaceShip class, which has arrays for weapon names and damage, and variables for shields power, hull, engine power, and mass. I created two in...
[3 replies] Last: On line 43, you pass target by value, which makes a copy. Pass by re... (by LB)
Template ,compile failure
 
I'm learning C++,but i meet a problem .When i use date array,my program compile failure,i don't know why(other fine)... who can do me a favor? God bless you...
[1 reply] : It looks like your line 17 got corrupted somehow, look to the mid-righ... (by LB)
Curious about coloring output text
 
I'm wondering if anyone can help me make my program a little more portable. It works on my computer (Mac OS X) and works the way I want it, but it is reliant up...
[5 replies] Last: Thanks guys. I'll look into that graphics api you talked about, Lachla... (by VioletteVanadium)
by erty
Best way to exchange array between derived class and base class
 
Base class has an array, whose size is controlled by the derived class. I can't use the STL and use a 2003 compiler, so things like std::vector and std::arr...
[6 replies] Last: The entire code has to be present, but only the necessary bits are act... (by keskiverto)
April 2014 Pages: 1... 2728293031... 41
  Archived months: [mar2014] [may2014]

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