General C++ Programming - December 2010 (Page 22)

To create a class
 
#include<iostream> #include <string> #include <queue> #include <fstream> using namespace std; ...
[1 reply] : http://www.cplusplus.com/articles/how_to_ask/ (by Bazzy)
Using two for statements
 
I need to display a table consisting of four rows and 11 columns that should resemble the table belo...
[5 replies] Last: Sorry, here is the final version, can u tell me if anything else is wr... (by scottie7580)
stacks
 
Program goal : user input for 2 equations to evaluate the operator signs. i.e. 1 * 2 + 4 - 4 and ...
[1 reply] : Your code is quite obfuscated. while ((ch1 = cin.get())!= '\n'){ ... (by ne555)
how to make a non-recursive function from recursive
 
Hi, could you help me with my problem? How to make a non-recusrsive function from a recursive one? T...
[9 replies] Last: I think you need to read up on how binary tree is organized before att... (by jimc)
by Adidas
NULL problem
 
I'm geting very strange fail after I creat a linked list and because of that my if sequence fail to ...
[4 replies] Last: Why do you care? You don't have to do anything special in your code to... (by firedraco)
by Zaroth
Sorting a pointer to vector of pointers to string
 
Hello all, This is an lab exercise for school, and I'm trying to figure out how to sort a pointer...
[4 replies] Last: A binary operator can be a member function, with an implicit "this" ar... (by jimc)
by schep
std::includes correction
 
The sample implementation given at http://www.cplusplus.com/reference/algorithm/includes/ is incorre...
[1 reply] : Use this form: http://www.cplusplus.com/member/contact.form?referrer=h... (by firedraco)
by Jyrroe
How do I pass a 2D array to a constuctor with variable dimensions?
 
I want to make a class that will allow me to create a "CharMap" object so I can output them (2D char...
[2 replies] Last: You can pass it as an array if you can specifiy the second dimension a... (by jimc)
Nesting Templates
 
I suppose that it would be easiest to start with what the expected result should be. //The e...
[no replies]
by areid
Having problems with stacks (push and pop)
 
I don't undestand this concept can someone explain
[no replies]
by xephon
question regarding some c++ syntax
 
I'm reading The C++ Standard Library. within the implementation for auto_ptr, there is this line: ...
[2 replies] Last: thx man, that cleared things up. (by xephon)
string and string&
 
as for function with string type parameters void func(string s) for efficiency purpose, should i...
[3 replies] Last: No direct access to the actual value, but faster to pass it then by v... (by filipe)
Copy
 
Is there a way to put text on the clip board for example "cat" Thanks
[3 replies] Last: You call: OpenClipboard SetClipboardData CloseClipboard You have... (by kbw)
templates: despite "this->" is a call to independent function not executed
 
Hello, below you find code for a few template classes. In DisconnectedState::connect() you fi...
[3 replies] Last: Thank you, Snarky! The catch block is never executed. But commentin... (by coder9911)
SIGSEGV problem
 
This is driving me mad. It runs through OK and gets 8 records from the data queue on the iseries bef...
[no replies]
by Adidas
Linked List inside a linked list List...
 
Good morning I want to build a linked list in a linked list I don't want to use #include<list> but...
[1 reply] : The question is, what do you want to add? (by hamsterman)
by onur
disabling polymorphic behaviour when it's not needed
 
Hi, I have a class hierarchy with virtual methods: (I dropped all safety issues like std::auto_ptr...
[7 replies] Last: I tried to check if the compiler optimizes these calls but at least it... (by onur)
Segmentation fault error
 
I am trying to write a code that reads data from a file, after reading the data it should look for d...
[10 replies] Last: Hi danmbembe Thank you very much.I just want a good begging in linux ... (by aiby)
search function of Binary Tree not working with class objects
 
I have a class of "stocks" which include a company name, company symbol and stock price. I am build...
[1 reply] : Do you have operator== and operator< defined properly for "stock obj... (by jimc)
Grid game
 
You are given a square grid of positive and negative numbers. You have to start at the top left corn...
[7 replies] Last: I was bored. Here's a program I whipped up that appears to work. The... (by Disch)
December 2010 Pages: 1... 2021222324
  Archived months: [nov2010] [jan2011]

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