General C++ Programming - August 2014 (Page 4)

Vector is losing an entry when function has finished
 
I am implementing an Entity Component System and am having trouble when I am attempting to add a Component to an Entity. The structure of doing so is as follows...
[3 replies] Last: The idea that Mr. ne555 is eluding to is that we need to see more co... (by Computergeek01)
Help exponent has no digits
 
#include <iostream> #include <string> using namespace std; int findCharInString(const string, char ); int main() { string name1 = "Hello from C...
[2 replies] Last: I have no idea how I did that. Thanks! (by bwilson1)
-
 
[3 replies] Last: @OP is there a reason you deleted your post and re-titled the thread... (by giblit)
PLEASE HELP AS SOON AS POSSIBL
 
prepare a c++ program which will compute Fibonacci numbers. the resulting answer must be of unsigned long The input is the position of the requested number in ...
[5 replies] Last: i don't either (by jasonwynn10)
Help me with the C++ program
 
Write a menu driven program that will fill grid with values between 1 and 100. Begin the program by declaring a array of type int. Then present the user with...
[2 replies] Last: We don't get bossed around like that! try saying please next time! (by jasonwynn10)
Receiving an input
 
When i run my program, one of the requirements is to be able to accept an input at any time. EG: If the user presses escape at ANY time of the program. The prog...
[4 replies] Last: have you tried using getasynckeystate(VK_) (by jasonwynn10)
by tmason
Help with Invalid Pointer Reference for OpenGL/Bullet Physics Project
 
Hello, I have a rather interesting problem that I am not sure where the problem is. I am building a basic OpenGL/Bullet Physics engine just to learn the t...
[4 replies] Last: @Computergeek01, Thanks for the tip; It's so weird because other exam... (by tmason)
Max subsequence
 
Here's the code that returns maximum sum of a subsequence from a given array. This is according to "Programming Pearls" by Jon Bentley. I have come up with an e...
[11 replies] Last: http://stackoverflow.com/a/388282/1959975 (by LB)
Conversion of Basic to C++
 
So my question is what is that "TO" in the for loop? The Basic Code is: FOR I=0 TO NN; I want to know what that TO is? Thanks in Advance, Djmax
[1 reply] : For counter = start To end So FOR I=0 TO NN; is the same as for(... (by BHX)
Basic Text File Code
 
Okay, so the problem I'm having is that I can't get it to read the file after I enter it. I'm assuming it's because the file isn't being opened correctly, but a...
[7 replies] Last: It probably is not opening the file either because the filename is inc... (by Chervil)
by AceK
Incompatible types issue
 
hi there, I have a lib function that returns one word of type const char* . I want to compare this word in an if statement condition against a C++ String word....
[2 replies] Last: Make sure the C++ string is on the left No need. The == operator has... (by Peter87)
by fafner
Static variable in member function
 
I need to keep a static variable in a member function of a class that I have many objects of. I've had some trouble with it, and when I read up I found that s...
[3 replies] Last: Hehe, I realized just too late that it was that easy :P I didn't reali... (by fafner)
Inline function question
 
Hi in the code below, the function someFunc can't be inline function and the function otherFunc can be inline. someone can explain why? struct Base1{ ...
[2 replies] Last: yes i inlined those functions and when i call them in main() the first... (by yyoni69)
const char * to vector array char * error
 
Hello, I'm trying to do a quick conversion from a const char * called to a function to a vector array for comparison. I'm doing a quick aka dirty conversion ...
[4 replies] Last: Ah. I have to look. I noticed some code that leaves me from messing wi... (by vivienneanthony)
operator()
 
Hello C++ guru's:)) Tell me please, could operator() be overloaded by return type?
[9 replies] Last: That's the cast operator, though.. Not the () operator. Though you a... (by Disch)
TEventLogger
 
Hello, I want to make a log with errors during the execution of my app. I'm trying to write an event to the windows Event Viewer with a VCL form applicatio...
[3 replies] Last: There was a link to a sample on that page. Here it is: http://msdn.mic... (by Computergeek01)
I'm a little lost
 
I'm a beginner in programming and I have started a program for my game but I'm stuck here's the code I'm at so far. void View::newGame() { string playe...
[1 reply] : http://www.learncpp.com/cpp-tutorial/135-stream-states-and-input-valid... (by shuraman)
How to i change 1E to 1X in C++
 
Hi my question is that i have a row of numbers 1E to 12E But i want to change it to X as i wish E.G 1E 2E 3E 4E 5E 6X 7E ...12E 1E 2X 3E 4E 5E 6X 7E .....
[6 replies] Last: Poor Nicholas has posted more than one thread about his blight, scatte... (by keskiverto)
C++ declaration of a variable to hold a table of 5 records
 
Hi all, im doing a program to store name, age, time and fitness. and i need to hold a table of 5 such records. can i do this? #include <iostream> using na...
[3 replies] Last: @ JLBorges : Why would you encourage OP to continue writing this way?... (by Computergeek01)
Using a child class as a parameter of a function in it's parent class
 
Hello All! I am currently having an issue with a piece of code that I am writing in which I need to use a vector of a child class as a parameter in a functio...
[3 replies] Last: > This time, it refuses to compile because it needs to know the full s... (by JLBorges)
August 2014 Pages: 123456... 25
  Archived months: [jul2014] [sep2014]

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