Beginners - August 2016 (Page 6)

SFML redraw same sprite
 
I have a sprite and am able to display it, however now I want to "redraw it" and display it in a different position, so that there would be two of the same spri...
[2 replies] Last: Thanks i just figured it out! (by Gantzias)
by cmisip
Deleting an 2d array created with new in a class
 
Is this the proper way to delete matrix? class map_item{ public: map_item(micro_behavior *add, std::string k) : address(add), key(k){ ...
[8 replies] Last: I switched to shared_ptrs so I dont have to worry about the memory lea... (by cmisip)
by cmisip
variadic template for class member undefined reference
 
How do I create a class member function that takes on multiple unknown number of arguments as parameters. I tried this implementation In Behaviors.cpp ...
[14 replies] Last: Works, no runtime issues. Thanks for your time and interest Chris (by cmisip)
Birthday Paradox coding
 
Hi, I currently teaching myself C++, and am building a simple code that given a set class number of people, will work out the probability of at least two of th...
[16 replies] Last: [quote=cire]You probably didn't bother differentiating between those c... (by TheIdeasMan)
getline and wchar_t
 
Hi, I have the following problem: I want user to write the filename in console. I tried this: #include "stdafx.h" #include <iostream> using namespace...
[12 replies] Last: You are great, Thanks a lot! (by Zeltrax)
by MAhmed
Pointers
 
trying to make a pointer which call function from human class but having difficulties please check below on line number 28-29 #include<iostream> using ...
[3 replies] Last: No, you don't need to create a new one. You can have the pointer point... (by JayhawkZombie)
Why does it say segmention fault : 11;
 
Write your question here. Hi, When I run this code it print segmention fault : 11 and does not print out he array. Here is my code: #include <iostream>...
[2 replies] Last: I am trying to do quick sort (by IanZhang3374)
Creating Abstract Data Types
 
Hello! I am having problems understanding how to create my own abstract data types. This is the question in which it is taken out of, Write a program t...
[19 replies] Last: Hey Abstract, that bool function with the print one actually makes sen... (by LiBRiUMz)
How do I output the complete text from employee.dat to employee.dak?
 
Hello, I have created a text file using the data contained in arrays of various data types (char, int, string, etc). But when I try to read and output to a ...
[2 replies] Last: Hello, // need ifstream to read the information ifstream employe... (by Shishykish)
program about are you smarter than a 5th grader (1,2)
 
//can someone finish my program about are you smarter than a 5th grader? btw i already put the answers up, i dont know what should I do next, please help me, im...
[31 replies] Last: I still can't figure it out where to put "congratulations" because it ... (by advancety)
Simple program | Recursion
 
Hi, so I get the error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1101:1: note: ...
[2 replies] Last: @ Grey Wolf >> Thanks. (by aurimas13)
For loops
 
Hi I have a question regarding for-loops. What value would be saved in x? int x = 0; for( int i = 0; i < 4; x += i++ ); As I understand, the loop starts fr...
[6 replies] Last: kevin84, All these answers are good, but they have kind of missed the... (by Handy Andy)
Need Help
 
I need help with my code for school. My code will not let the user input 'y' or 'n' for cin >> poBoxConfirm. I have looked over my code and it looks right to me...
[4 replies] Last: Your welcome! Hope you come back to the forums again sometime :) (by kevinkjt2000)
by Matta
help with variables
 
Write your question here. #include <iostream> using namespace std; int main() { float x1; cout << "please enter first line length : " << endl; ...
[2 replies] Last: It's the prompt that is automatically put in the box you type your que... (by shadowmouse)
by slex04
Running while loop
 
Why cant I get this to display anything when running in codeblocks? #include <iostream> using namespace std; int main() { int s = 0; int n = 0; while (n <= ...
[4 replies] Last: yeah ...I see it now ...that's a silly mistake thank you (by slex04)
by Enot02
Violations?
 
I wrote this code, but, after I enter any number in LabeledEdit1 and press the button, it gives an access violation dialog. Codes:0x00401bc0,0x11aec8b4. /...
[4 replies] Last: My expected output is that 2 is this:https://en.wikipedia.org/wiki/Col... (by Enot02)
How to pass a callback function (with arguments) as a parameter of another function
 
I know how to pass a callback function as a parameter of a class constructor function, and store its reference in the class... (hope that made sense) public:...
[3 replies] Last: Thanks Cire and Kevin for your answers. I got a better understanding n... (by hashbrown)
variables Questions
 
So say you're making a calculator (and i am), and you want to make the user input the first number, then the second number, then use the sum of the 2nd number t...
[8 replies] Last: If you want to progressively subtract then running_result -= number; (by closed account 48T7M4Gy)
Centered Average
 
I don't want any single line of code , I just don't get what the question really means/wants. A little bit confused of what I'm supposed to do, if anyone can gi...
[2 replies] Last: Ohhh, thanks alot, that made everything clear. (by Hesham0)
Class Program
 
Please help me with my program for class. We are making a minesweeper program and I am stumped. Please tell me what I am doing wrong. My code is as follows.... ...
[4 replies] Last: Maybe this helps - I made the game array a char array instead of a int... (by closed account 48T7M4Gy)
August 2016 Pages: 1... 45678... 22
  Archived months: [jul2016] [sep2016]

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