General C++ Programming (Page 43)

pass by value and pass by reference
// explain difference between pass by value and pass by reference void addOne(int i) { i++; } v...
[2 replies] Last: When a variable is passed by value it copied into the stack. This mean... (by Computergeek01)
8086 illegal rep prefix?
What happens when rep is used with illegal opcodes (non string instructions, like call)? is the pref...
[no replies]
by manojg
strlen of c-string
int main() { int len = 8; char temp1 ; char temp2 ; char temp3 ; cout <...
[9 replies] Last: Thanks. I am using gcc 4.8.3. make the array dynamic or prefix it wi... (by manojg)
so i have a computer game programme, but it is showing an error when i compile, error:- main.cpp|12...
[1 reply] : MenuState is a const int, not a type. (by helios)
SDL - Destroying SDL_Textures*
Hello, So I have a SDL_Texture* wrapper called CTexture that just has a private member of SDL_Tex...
[1 reply] : Yes, it's valid as long as you don't reference your texture again. (by Avilius)
Random Number
How to do a numbers input, randomize the numbers using something called Fisher Yates shuffle? This i...
[18 replies] Last: To pass an array to the function you just put the name (without ). (by Peter87)
What am I doing wrong?
It wont shuffle #include <iostream> using namespace std; void my_swap(int &a, int &b); void my_...
[2 replies] Last: So first off, your my_shuffle(a) is using an integer argument that h... (by Aaron Vienneau)
Plz help
So if I have an array how do I convert it to a balance binary tree?
[1 reply] : You can sort the array, and then take the middle value as the root nod... (by myesolar)
by vlucaj
how to find and replace in text file
Hello right here I have a program that gives the user the option to create an employee ID, name, add...
[1 reply] : What I want to know is how to add and replace employee info. For exam... (by coder777)
Type Casting in C++
class Cint { int a,b; public: void display() { cout<<a<<b<<endl; } }; class Ccha...
[2 replies] Last: YOu have used an unsafe C-style cast. In this case it works as reinter... (by MiiNiPaa)
Hold key problem
Hello guys! I have a question for you and I'm sorry if I'm wasting your time. I made a game in C++(...
[9 replies] Last: Problem solved =D! if(GetKeyState(VK_A)<0 && joc[hM-1] !='*' && joc[h... (by creative3000)
Simulating 2D array with 1D array?
Hi, I'm trying to simulate a 2D array using a 1D array. The array looks like the following: const...
[4 replies] Last: 2D matrix coordinates are in format {row, column}, where the row numbe... (by MiiNiPaa)
Get angle of bullet after bouncing
I'm trying to make a bullet bounce after it hits a wall. I think bouncing on the top and bottom wall...
[3 replies] Last: I tried some more code and I still can't get it working right. It kind... (by Bingocat4)
Says no operator "==" matches these operands
#include <iostream> #include <string> #include <cstdlib> #include <time.h> #include <windows.h> ...
[1 reply] : // if(Cat == 'Yes') if( Cat == "Yes" ) (by JLBorges)
lambda functions causing errors
so im trying to write a function that extracts chunks of numbers from a stream (ie if i had "ui33ui2...
[1 reply] : You want the body of the of the function in the header file for templa... (by myesolar)
How to insert 10 different numbers to a BST and print out randomly?
[2 replies] Last: Your asking a whole lot in a small question. BST's are widely document... (by Bunny)
iterating over a stream
so i am refactoring this function: because it was incredibly messy befo...
[2 replies] Last: yeah thats what im kind of doing. i actually figured out a solution th... (by Little Bobby Tables)
fstream doesn't protect file?
Hey, This is more of a general question than a specific code question, but I think it fits into t...
[no replies]
by Bunny
Header for library
Hi all, I have a design consideration regarding shared libraries and the common approach to this ...
[9 replies] Last: I'll go with the two separate headers, a solution that seemed be be an... (by Bunny)
Undefined Reference Errors?
I am having compilation linker issues and am looking for an explanation as to what is causing the er...
[14 replies] Last: OK, appreciate the heads-up. Thanks for the help. (by dptru10)
Pages: 1... 41424344
  Archived months: [jun2014]

Cannot post in this page. To post a new message, go to the first page.