General C++ Programming - March 2011 (Page 4)

by Lcat8
Old-style method??
 
Hey all, this is my first time posting but I've lurked here for quite awhile! Right now I am att...
[3 replies] Last: Don't use in your new C/C++ program but you must know the syntax cuz y... (by sohguanh)
typedef, inheritence, templates
 
First time poster. I have just been introduced to boost and shared_ptr and having a few difficult...
[3 replies] Last: typedef isn't good. Why not making it the real thing: class Service ... (by coder777)
what's the point of getVarName methods?
 
Hi, what's the point of methods that just returns protected class members? i.e: class Foo { p...
[10 replies] Last: [quote=hanst99]You should never generalize (that's a generalization as... (by coder777)
Hash tables
 
This is my first time working with hash tables so bare with me if im waaaaay off lol. This is the as...
[1 reply] : Your constructor should look like this HashTable() : ... (by coder777)
by PiZero
recursive flood fill using 2D array
 
A common operation on images is called "flood fill", which takes three inputs: 1. a row number...
[1 reply] : if ( fpaImage != fpaImage ) Is A equal to A? You need to make t... (by ne555)
"Left-most child next right sibling " traversal prob
 
I am trying to elaborate my prob here.. i used "Left-most child next right sibling" to simulate my P...
[no replies]
by rpar
return array (char, double) from function
 
Code below is part of the file i have created to return result of mysql database. it works ok by it ...
[8 replies] Last: hurraaaaayyyyyyyyyyyyyyy!!! yes i found the same at this link http:/... (by rpar)
Trying to move forward with my 2D array
 
Hello I am working with a small group to put together a project and my part involves making a sin...
[5 replies] Last: Ok I will be working on this till I have a more specific problem to as... (by Cppbeginner)
by by123
calculate the height of binary tree with a given node
 
Hi, how to write a recursive function that takes as input a pointer to the root of the tree and a no...
[1 reply] : That was an interesting problem. I came up with a method which appears... (by closed account D80DSL3A)
Aborted <core dumped> ??
 
deleting so noone copies my stuff
[1 reply] : Nevermind i figured it out, Heres my modified code if you are all wond... (by tkauffman2)
design a class which sotres month, date and year
 
"Design a class called Date that has integer data members to store month, day, and year. The class ...
[1 reply] : You code does compile without errors here. For the print member funct... (by naaokth)
empty() and ful() functions in stack class
 
given the definition of empty() bool Stack::empty() const { return (myTop == -1); } ...
[2 replies] Last: I thought myTop couldnt be > 128 because 128 is the stack capacity :S (by camouser)
Maximum sum subarray of a 2D array
 
Does anybody know how to calculate the maximum subarray of a 2D array? and how do i find it's positi...
[no replies]
derived class setup
 
I am making a queue based on an unordered linked list. I have an unorderedlinkedlist class and a li...
[3 replies] Last: I understand pretty well about making single classes, and some simple ... (by closed account zwA4jE8b)
Problems parsing binary.
 
I'm getting a memory access violation with my binary parsing program. Does anyone know what I'm doin...
[10 replies] Last: string bin_to_string(string binary){ string end = ""; string buf = ... (by ultifinitus)
Empty vector problem
 
Hello, Im having some problems implementing a vector of classes. Somehow when i fill the vector eve...
[1 reply] : Neither do I. I fixed/expanded your code so that it can be compiled a... (by hamsterman)
help me.... can anyone solve my prob
 
#include <stdio.h> #include <string> main() { int plan,p_num,ic,poscode; char name ,add ,sex ...
[2 replies] Last: 1. No, we will not "solve it for you". Do your own homework. We'll giv... (by packetpirate)
by clros
Problem with tellp()
 
Hi! To verify that a stringstream object is "empty", I use tellp() method in this manner: strea...
[4 replies] Last: If it's specifically a stringstream, I'd recomend going with aiby's su... (by kbw)
by secret
I need help on how to write a program using C++
 
I'm given a homework that says: write a program that when input any three integers from the keyboar...
[8 replies] Last: int max(arguement1, arguement2, arguement 3) { ... retur... (by secret)
March 2011 Pages: 123456... 31
  Archived months: [feb2011] [apr2011]

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