General C++ Programming - May 2013 (Page 2)

Review My Code and Progress
 
Hello Guys I am new to this forum so if I have broken any forum rules in what I'm doing then I do apologies. I've been teaching myself C++ for about 3 m...
[7 replies] Last: const int FORCE_EXIT = 1, NO_FORCE_EXIT = 0, ENTER_INF... (by closed account o1vk4iN6)
Simple Movement
 
So I've been making this game and its done actually but the problem is when I hold down a key it goes forward 1 then stops then continues. I did it a bit like ...
[4 replies] Last: That's because of the repeat. Like how you hold down they key 'd' in... (by BluRezZz)
I just need to learn how the for loop in the function in this code works to find the lowest value in the array.
 
I need help in understanding how the function in this program knows the lowest value in a array. Please someone help me #include <iostream> #include <ioma...
[7 replies] Last: So that means that when the function finds 3.0 > 1.5, this updates j a... (by Dave Jones)
Code cleanup
 
My primary function is about 1000 lines long. But I have to create two configurations : Debug & Release version. In general they are the same but they also have...
[6 replies] Last: Works for me. Thank you - I appreciate it! (by Kikiman)
by Numeri
Calling all Instances of an Object (1,2)
 
So I am wondering how I would go about calling a function for all instances of an object. I tried googling it, but all I saw was solutions like making an array ...
[22 replies] Last: Ah, I was under the impression that the static container was always al... (by LB)
by Daleth
Constructor Confusion
 
I have this return as follows: /* Clarification - ExtensionType is a strongly typed enum - Build returns a pointer of type RobotExtension* */ retu...
[18 replies] Last: I'm not really sure either, but once I'm finished fixing all the typos... (by Daleth)
Problem after user input
 
hi guys how are you,, I have a problem in my prpgram if anybody can fix it for me please, i shall be ver thankful,, When i run my program, its a banking progr...
[3 replies] Last: For character literals i use STRLEN() function and then to convert it ... (by junaidkhan2013)
easiest way to link modules in Codeblocks?
 
I find myself in a position where I am repeating the same pattern of, write shared lib, compile, link shared lib, write app lib "sandbox" dependant on shared l...
[1 reply] : taught myself a solution. (by DeXecipher)
What kind of knowledge will I need for...
 
If I want to be able to convert a .bin file into a .ecm and vice versa. Or an .bin into an iso. I'm just curious from a mathematical perspective. Because I am v...
[8 replies] Last: it seems some of that is way beyond my understanding right now. (by DeXecipher)
by JDOdle
My if statement is being ignored!
 
My program is supposed to go through each character in a string and check if it is a number; if so it returns the number as a variable, if not, it returns "This...
[2 replies] Last: 0 <= numValue <= 9 is wrong.First only 0 <= numValue is analised. ... (by francilio)
Automatic Storage within Scope
 
Hi there, I encountered a funny problem and don't know what to make of it. The following code allows to print the correct name in the main function which was...
[3 replies] Last: There's a famous SO post about this http://stackoverflow.com/a/6445794... (by Cubbi)
codeblocks stopped working, why??
 
I am doing a homework assignment for data structures involving ASCII font art and when i build and run the program it gives me a message saying my file has stop...
[3 replies] Last: you are missing a brace before main. You use the arguments passed to m... (by Yanson)
Passing lambda as a template parameter not working correctly.
 
I've was trying out a function template to automatically get the type of a lambda, but it seems that it won't compile I've tried two different ways: 1. te...
[13 replies] Last: The compiler doesn't have to diagnose undefined behavior That's fun... (by AdrianH)
Need help reading .txt file into binary tree
 
Hi everyone, I've been trying to figure out how to store values from a .txt file delimited with semicolons (;) into a class which is then stored into a Binary S...
[2 replies] Last: Oh, :) seems that your programme that you stated isn't the programme ... (by AdrianH)
Writing Integer Array to File in Binary Form and Reading It Into Integer Array
 
Both arrays arr and pointers are the same size. I am having problems reading pointers from file into a new int array. Do I need to cast it somehow? Thank you....
[2 replies] Last: pointers is just an array of integers. (by knowNothing)
Curly Braces If Else
 
I have problems understanding when to use curly braces on If Else statements. I'm new to C++ and if you have any suggestions on books that will help please let ...
[3 replies] Last: There's a tight battle between two different kinds of programmers: tho... (by LB)
Function pointer with an object as parameter
 
I'm making a code that uses a Function pointer. The problem is, when I try to compile appears an error like: error: no matching function for call to 'rnVector...
[12 replies] Last: Oh, I understand now. Thank guys. I had already programmed in C and Ja... (by francilio)
trying to get a timer in a game i made, can't get it to work.
 
#include <iostream> #include <cstdlib> using namespace std; int t=0; //timer int main() { int r; //random number int x; //input for random number char a...
[1 reply] : 1) You are not calling your time() function anywhere 2) If you call it... (by MiiNiPaa)
Strings in C++
 
How do you handle strings in C++ . Mainly Input. Now You might be thinking that I should post this on the beginner forum but I am actually quite intermediat...
[1 reply] : #include <iostream> #include <string> using namespace std;/d //Avoi... (by MiiNiPaa)
nibble vector, iterators?
 
I'd like to cook up a nibble vector (packed vector with datatype 4 bits). I need this to be memory efficient so taking the low bits of a vector<uchar> isn't de...
[5 replies] Last: Ummm, for my use i have zero problem with &vecnibble working. Just b... (by bnolsen)
May 2013 Pages: 1234... 47
  Archived months: [apr2013] [jun2013]

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