General C++ Programming - December 2014 (Page 14)

"Base class undefined"
 
Hi, I have an error here that's confusing me, it looks like a include-problem. I have the following classes: NPC Animal (is a NPC) AI AnimalAI (is a AI)...
[10 replies] Last: If this thread had a 'like' button i'd be pressing it. (by mutexe)
linked list in C
 
I am trying to write a linkedlist in c, but for some reason I have run into a problem where the list head is always NULL. Maybe I am overlooking something, but ...
[2 replies] Last: Thanks for the help. I see exactly what you are talking about. (by haglerchristopher)
by iBlueZ
Need Help!!!
 
So i have a final project to do: ---So far i have this code: #include <iostream> #include <fstream> #include <string> using namespace std; int main() { ...
[9 replies] Last: Alright, thanks for the info,means alot :D (by iBlueZ)
infinite cout loop in else statement
 
I have more programming before this, but everything else works fine. My else loop has an infinite output. i also want it to output an error message if the value...
[7 replies] Last: You have to remove cin>>material before the getline. (by minomic)
by adam43
Adding current date to the end of a string
 
Write your question here. I need to add the current date to the end of a string but I only need to add the day and not the year or month. Put the code yo...
[1 reply] : You can use functions from time.h or ctime time_t ti = time(0); ... (by tanezavm)
Replace calls to the linear algebra operations by eigen3.
 
static SGVector<float64_t> compute_eigenvectors(SGMatrix<float64_t> matrix); static double* compute_eigenvectors(double* matrix, int n, int m); These are ...
[no replies]
need help
 
Hi, I would like to know if there's a way to show at least two numbers in the output instead of just one. For example: instead of showing 4 it shows 04. Its f...
[3 replies] Last: examples: cout << setfill('0') << setw(2) << 4; -> prints 04 int x =... (by tanezavm)
I need a little bit of help figuring out this problem
 
Here is the question first of all: (I'm using visual c++) Write a program that calculates the balance of a savings account at the end of a threemonth perio...
[8 replies] Last: Make it a habit that when you report that you have problem, paste the ... (by tanezavm)
I need help with Unary Operators (overloading)
 
Here are the details of the assignment: I am to write a program with a class Worker that has 3 private data members (int age, int yrsService, and string jobTit...
[4 replies] Last: I had read this previously but I'm still confused on how to use the op... (by dub1987)
Game engine
 
Please may i know some informations ? thanks 1. what is the structure of programming game engine ?? 2. is game engine something like photoshop where you con...
[2 replies] Last: http://sourceforge.net/p/irrlicht/code/HEAD/tree/branches/releases/1.8... (by ResidentBiscuit)
by Lexin
Tic-Tac-Toe problems
 
Hello, I need help with this Tic-Tac-Toe game. I am new to c++ and I understand I could have written this code much shorter than I did. Please dont change all t...
[2 replies] Last: You can also use a do-while loop: do { // ask for a number } ... (by minomic)
vector<> inside switch loop
 
#include <iostream> #include <vector> using namespace std; class tree{ public : int num; string code; tree* left; tree* right; tree(in...
[3 replies] Last: > do you mean that "vector<tree> huffman" do not have a destructor No... (by JLBorges)
MIDI using soundfont: adjustment in cents per MIDI note?
 
I'm currently using the following to determine the cents to move the sample of the soundfont, played in the resulting speed factor based upon it's supplied freq...
[no replies]
Need help with a program plz
 
Hi i need help, this program meant to take date by integer numbers check if the date is valid and return a date with month written in a word if it's not valid d...
[11 replies] Last: You could try something like this: #include<iostream> bool ValidMon... (by mutexe)
Is sfml/sdl worth a try or should i go with an engine?
 
I'm learning game development, i was looking for a nice api/framework for java, but then i decided that c++ would be better, at least for me. I looked into S...
[14 replies] Last: I was not talking about creating an engine, i was asking if i should u... (by Twk Amz)
Help with Excercise
 
My excercise is: Improve the Lobby class from the Game Lobby program by writing a friend function of the Player class that allows a Player object to be sent to ...
[2 replies] Last: Don't misunderstand the problem. You already have a function that all... (by tipaye)
by ejcpp
What's Wrong With my code? ARRAYS
 
**Every time i run the program nothing happens.** " You will be using a data file called elves.dat. There will be one line for each elf. That line will contain ...
[1 reply] : Given your code as it is, if you have elves.dat in the same folder and... (by tipaye)
by BasV
T const& versus T& const
 
Hi everyone, I know T const* a; // Pointer to T, object cannot be modified T * const a; // Pointer to T, pointer cannot be modified. Now I was won...
[3 replies] Last: Yes, makes sense. Thanks! (by BasV)
why isn't this working?
 
Why does this return 0? float ac=(79+91+100+43)/400;
[4 replies] Last: using C-style casts isn't really recomended. Unless you're writing in ... (by mutexe)
by DavidW
Pulse output through the audio jack
 
Does anyone know of a code snippet that will send a pulse to either the left or right channel of the audio jack and stop the pulse when desired? Platform is wi...
[1 reply] : A super cheap way, but is looked down on because it uses "Windows.h" ... (by poteto)
December 2014 Pages: 1... 1213141516... 31
  Archived months: [nov2014] [jan2015]

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