General C++ Programming - June 2014

Game not working with one more thing in struct?
 
I'm making a multiplayer shooter game, and for some reason whenever I add anything else to the bullet struct, the game crashes. If I add anything to any other s...
[14 replies] Last: Okay I found the problem! I guess I accidentally did this for(unsigne... (by Bingocat4)
Declaring an Array to be Empty
 
We have been assigned to create an iTunes library. Everything compiles in my other .h file but my main is not happy with my object declaration. It keeps stating...
[1 reply] : If you edit your post, highlight your code and click the <> button und... (by wildblue)
NES Emulator Question
 
Hello, I have a small question regarding an NES emulator. What exactly is the "Cartridge Expansion ROM" as described here? Can someone get into the specifics...
[6 replies] Last: Basically.. yes. Very few mappers use the $4xxx range. (by Disch)
trying to get void getscore() to read a file and report
 
#include <iostream> #include <iomanip> #include <fstream> using namespace std; // Function prototype void getScore(int &); void calcAverage(int, int, int, int,...
[3 replies] Last: as keskiverto said, please edit your post and use code tags, as the co... (by mekkatorqu)
Corruption of Head
 
I am writing a code which includes a dynamic variable. I am getting an error about a corruption of head. I knew that somehow I misused the dynamic variable b...
[3 replies] Last: Thank you again Peter87 and ajh32 (by Rahal1813)
class method implementation advice
 
solved. thanks
[1 reply] : bool isGreaterThan (const English_length & rhs) { // rhs = Righ... (by AbstractionAnon)
Calculate index
 
I have vector of keyframes for animation: struct Keyframe { float time;// time in seconds ... }; std::vector<Keyframe> vKeys; and every loop i acc...
[3 replies] Last: I think your method should be ok. It would help if you were able to i... (by kbw)
mkoctfile & CPP
 
I am trying to call from my "main" file another file that has a function that is using octave "fft" code. testmclt is the main function and expmod_r_odd has a ...
[1 reply] : The right format requires presence of all .cpp in mkoctfile Here: t... (by knowNothing)
by nicram
Operatins per second.
 
Hi, I have some small problem. I need to write some function in C++ witch should call some other function each next seconds. Is there any built in function for ...
[2 replies] Last: @ OP: The short answer is no. JLBorges solution would do what you ar... (by Computergeek01)
by Rockyy
SerialData Communication
 
Hello All, I am doing SerialPort communication program where i am opening the port and reading data from port and storing in one document. I debug my progra...
[3 replies] Last: What does WriteLine() look like? (by jlb)
writing calculations for unknown amount of students
 
I need to create a program that continuously records data until the user enters '0' The data that I read in is the student's last name, the year of the stude...
[2 replies] Last: Yes, I am a beginner. Thank you for your help! (by mbdst737)
threads to take sequential turns.
 
#include <stdio.h> #include <stdlib.h> #include <pthread.h> int turn = 1; int counter = 0; int t, n; struct tData { int me; int nex...
[2 replies] Last: My doubt is if we see in void *tFunc(void *arg) function, first threa... (by kbw)
by Xoen
Console RPG SHA-256 Checksum Problems
 
So I'm making a console rpg and after the task of making my save/load functions I began making a sha-256 checksum so the save file can't be edited. I've pretty ...
[2 replies] Last: I didn't learn much c++ besides a bit more than what I need for this p... (by Xoen)
Problem using flattened array (i get output in hex trying to print 2D array like 1D array - row major order)
 
I read the input from file and print it using 2 indices but when i try to print using 1 index for linear array, i get wrong output. The file looks like this(...
[3 replies] Last: You dereference the pointer. That returns the value from the memory a... (by keskiverto)
by prvn20
Hangman--Country Guessing Game
 
#include <iostream> #include <cstdlib> #include <ctime> #include <string> using namespace std; const int MAX_TRIES=5; int letterFill (char, string, string...
[5 replies] Last: If you actually listened and took my advice from your double post the... (by Codermik)
Recursion Resources
 
Hey guys, Simple question: Just looking for a good book or article on recursion. I know there are hundreds out there, but just want your opinion on an arti...
[15 replies] Last: Unless I'm storing the return value of the recursive function call in... (by Disch)
by Dano86
It works but it's not smart. help?
 
Ok so I am new to this forum and really forums in general, but I needed some help and because I'm not sure how to do something. I am also sorry if this post is...
[3 replies] Last: Thank you for reposting so others can read it. I am still wracking my... (by Dano86)
Is there a way to define a front and back texture on a Quad
 
Hey Everyone, Is there a way to have a front and back face on a quad , so that if I rotate the Quad, I can have a back texture on it that differentiates it ...
[no replies]
by wiswis
5 x 5 string array to encrypt/decrypt
 
im working on a program that reads a keyword. The letters of the keyword must be inserted in the order in which they occur into a 5x5 two dimensional array b...
[no replies]
by hero7k
trying to figure this out
 
I'm looking for some guidance on this one please if you know where on this website i can see examples on how to do it please You are to write a Class called...
[1 reply] : First of all: [quote=assigment]You should have a default constructor a... (by MiiNiPaa)
June 2014 Pages: 123... 21
  Archived months: [may2014] [jul2014]

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