General C++ Programming - April 2010 (Page 21)

difference between encapsulation and data hiding
 
Can anybody tell me what is the difference between encapsulation and data hiding with example? dun n...
[1 reply] : Encapsulation means to protect sensitive information in an object by m... (by Disch)
sorting the data of Map
 
How to sort the data of map?.As we can sort the data of the vector by using the standard sort functi...
[1 reply] : http://www.cplusplus.com/reference/stl/map/ Internally, the elements... (by R0mai)
Linked lists
 
I need to write a program to concatenate two linked lists. I have to include functions to: - crea...
[3 replies] Last: Mistake here(line 69): current->data2=a; All nodes in 2nd li... (by boolivar)
problem when copying with inheritance
 
Hi, I have some class in my program, like class A and class B. B is derived from A, like: class...
[8 replies] Last: The specific problem here is that printStuff should take a reference o... (by kempofighter)
Same enum constant name in different enums
 
If I'm not mistaken, it's an error to have two enums in the same scope with constants having the sam...
[2 replies] Last: Also check this out: #include <iostream> using namespace std; ... (by m4ster r0shi)
Banking class with file i/o
 
I have built a banking class, not fully done, but in the beginning stages, but I have come across a ...
[4 replies] Last: It definitely does. Thanks much! Really appreciate it Maikel (by ingenioushax)
by chee
friend/method functions
 
i'm trying to use the method friends in this class 3...here is the error im getting. Error 2316 1...
[1 reply] : You're missing the return type. (by jsmith)
Array of Array?
 
It's been a while since I've programmed in C++ but the need has risen. I am programming a simple p...
[2 replies] Last: You want Boost::Any for this... (by choisum)
Linked List
 
Hello Everyone! I am attempting to write a function that searches a linked list for a value that the...
[6 replies] Last: Thanks for all the help m4ster r0shi! (by ohsnap1319)
whats wrong here?
 
#include<iostream> what do you think is wrong with this code? using namespace std; int mai...
[2 replies] Last: It makes more sense to use ignore than get, imo. (by tummychow)
problem with reading from files.
 
I have two files which basically look like this: file1: 232 JOHN SMITH 3.4 34 H 345 ADAM SI...
[1 reply] : After reading the last value on the second lines of your files, the eo... (by sammy34)
Size of the Class
 
Question1: I know the size of the Empty class is 1. Why is it so. Please explain it in details. ...
[1 reply] : Question 1: because you can't have a type with a smaller size than a b... (by Bazzy)
How to choose between process core binding and thread core binding ?
 
If i have process P1 which contain two thread T1 and T2, then is it good to bind whole process to c...
[1 reply] : T1 to C1 and T2 to C2, ceteris paratus. It's unlikely to be worse than... (by choisum)
cannot find -lSDLmain
 
This is the error i am receiving compiling my code. I am using DEV C++. Here is the list of the para...
[8 replies] Last: I really wish SDL used a better method for initialization than #defini... (by helios)
Deallocating memory with only the address of the data
 
I'm "reverse engineering" a game (Neverwinter Nights) as part of a project that hooks into the game ...
[9 replies] Last: Wouldn't that also mean that if I re-allocate the array there is a po... (by helios)
Read Multidimensional Array Constructor
 
I am writing a class FireWeatherWRF and i have a private declaration data_array that is called and...
[10 replies] Last: Thanks all for your help. I worked with a different language when hand... (by stavros)
validating
 
This is part of a function for booking seats, can anyone show me how to handle the validation below...
[1 reply] : I want you to notice the difference between the operators you use for ... (by m4ster r0shi)
counting numbers from a file
 
I am trying to count the Xs, Bs Is and Ws that exist in a file and output a summary of the count. ...
[4 replies] Last: As I said, your while loop makes no sense. 'ch = 'X'' has no effect o... (by hamsterman)
by sporx
finding the height of a Binary search tree
 
my code was working fine until i tried to implement the function to find the height of the tree. any...
[3 replies] Last: b.height(&b); alternativly do an overload by: class Bin... (by maikel)
Using Arrays and learning Hexadecimal adder
 
I am to make a hexadecimal adder here is my question: I need help writing a hexadecimal adder. Th...
[3 replies] Last: All of you for loops in this program should look like this: for(int i ... (by hamsterman)
April 2010 Pages: 1... 192021222324
  Archived months: [mar2010] [may2010]

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