General C++ Programming - December 2011 (Page 18)

by Tresky
Moving Data Around
 
Suppose you have three object. Object_1 Object_2 Object_3 Object_1 contains Object_2. Object_...
[4 replies] Last: Oh yes!! :D Thank you very much. :) (by Tresky)
class inheritance problem
 
i can't seem to get the inheritance right can someone help for void attack #pragma once #include<i...
[14 replies] Last: Are fighter1 and fighter2 really supposed to be two unrelated classes ... (by mmay)
simulate the goto command in basic
 
I have a program that is supposed to allow the player and the computer to take turns removing straws...
[4 replies] Last: In this particular case, a "for" loop wouldn't gain you much more than... (by mmay)
Encapsulation: free functions or a class
 
For a long time now, I have used used this very informative article by Scott Meyers when implementin...
[3 replies] Last: I don't see a problem with this setup. I've seen call stacks with a f... (by webJose)
assissstance need for referencing
 
i am trying to write a simple turn based rpg game in void attack of course this is where they attack...
[2 replies] Last: that work thanl you (by gregar0)
by Mats
Most Efficient Brute Force
 
What is the most efficient way to brute force through a 2D array, trying different possibilities? ...
[3 replies] Last: The advantage of brute force is that it pretty much always works... ex... (by hanst99)
Logger excercise
 
Another semester over, another random project I feel like attempting. I've been in the mood to make ...
[6 replies] Last: I can really just use key::x? All the research ive done has said to ge... (by ResidentBiscuit)
mySQL with C++
 
Hi all, How do i get a value from a certain field from a database and assign it to a variable in ...
[3 replies] Last: Hehe yeah I was a little harsh. ;) (by Ben Bowen)
copy and tolower
 
Hey all, I have char *tokens where buffer is an int of some positive value. The contents ...
[12 replies] Last: Ah, I didn't know that... Alas. Direct C-casts are ugly. (by Duthomhas)
Specify membership of function point when in argument of definition of function?
 
Hi, I'm beginning in C++ with someone else's code that I am changing to suit my purpose. After maki...
[8 replies] Last: Yeah, if static methods are out (because local state has to be accesse... (by mmay)
Intro c++ Flag controlled loops
 
I have been working on this for about 8 hours now and cant grasp what it is or why its not working, ...
[1 reply] : "done = true;" will mean that "while (! done) {..." will never execute... (by mmay)
Inheritance problem !
 
What is wrong to use base class object to initialize the member variables and then using the values ...
[9 replies] Last: Why does your polygon class only have "width" and "height"? That doesn... (by hanst99)
Upcasted Assignment Fails
 
I'm curious what exactly is going on with the following code: #include <iostream> class Bas...
[3 replies] Last: This is a geniune design problem for matrix libraries. boost.ublas all... (by Cubbi)
by Skript
Structure
 
Hello, i've done the most part of my task. But there is 1 more thing to do Need to find the "avare...
[no replies]
by HeXor
clear vector elements
 
Hello everyone! I am having some troubles with a vector. If I clear it, I can still access the elem...
[6 replies] Last: What you should be doing is getting the result of vector::size() and b... (by moorecm)
by lovit
Writing Output Files
 
Hi. I am pretty new at C++ and am having a problem reading from one file and writing to another fil...
[4 replies] Last: I think it has something to do with the line not moving to the next l... (by Ben Bowen)
matrix problem
 
I write a code for a problem. My roblem is: Enter n x m integers from text file Arrange above inte...
[8 replies] Last: @hamsterman Ahhh you are right-Sorry about that! It's been so long s... (by Glen Jenness)
How to enter the number of arrays?
 
I got a job and faced with this problem. Enter "num" - the number of arrays. How to do this? How ...
[no replies]
recursive inorder bst
 
hello i want to write an inorder function that takes all the nodes from the bst and stores them in ...
[3 replies] Last: Well, no tricks no secrets just experience (by coder777)
type as function argument
 
How can I pass a variable type as function argument, e.g. function(a) works with variables of type a...
[3 replies] Last: Yes, templates is what I meant! Thanks for the input. Some more googli... (by CryptKeeper)
December 2011 Pages: 1... 1617181920... 39
  Archived months: [nov2011] [jan2012]

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