General C++ Programming - October 2009 (Page 9)

fstream with numbers
 
class something { public: int zero; int med; char one; friend std::ostream& o...
[5 replies] Last: You can put whichever character you like but you'll need to use getlin... (by Bazzy)
static / Dynamic casting and references/pointers
 
Hi, I'm getting a bit confused while looking at static_cast and dynamic_cast while using referenc...
[3 replies] Last: thanks for both the replies! I think it's slowly becoming clearer. ... (by MisterEd)
Use a non-refence variable to receive a refernce-type returning value
 
I have a function as below: template<class T> T& Front() { T a = 100; return a; } In th...
[2 replies] Last: a in Front() goes out of scope before b is assigned to the value point... (by helios)
by ARWA
hello
 
hello every one; this my first participation .I have done until now 3 simple program :) i hope ...
[2 replies] Last: Please note that all code should go into the bbcode provided. (by closed account S6k9GNh0)
Customized "Compare" function for priority_queue
 
I have a structure "Event", for which I have defined proper comparison operators. I now want to use ...
[3 replies] Last: Yeah, the "function object" works! Thanks very much to jsmith! :) (by Ramboiory)
STL Map: string vs int as key type
 
Hi, I was wondering when finding something in an STL map if there would be a large performance diff...
[7 replies] Last: I think boost has a variety of CRC algorithms you could use. Or you... (by jsmith)
sungka game
 
anybody heard of game called "sungka"? i was wondering if i could get some help making a game in C...
[12 replies] Last: Not knowing it's name, I've actually played this game on computer year... (by narcissisticcheer)
2D Vector - push_back, erase
 
std::vector< std::vector<double> > my_vector; I have this 2D vector. How can I insert a double...
[4 replies] Last: vector.begin() does not return 0. It returns an iterator to the first... (by jsmith)
by jhelo
postorder program
 
good day! i'm here again asking for your help. We're making a program for postorder but don't know h...
[2 replies] Last: thank you. i now have a program that convert the nodes to preorder,ino... (by jhelo)
error C2662 const parameter
 
I have a class with 2 fuctions: COLOR_ENUM Flower::GetColor(void) { return m_Color; } ...
[6 replies] Last: 'Flower::GetColor' : cannot convert 'this' pointer from 'const Flower... (by player6)
by mgmsky
who can tell me?
 
i am coding in c++.so i want to know more about it. many prople think that java can do server for mm...
[1 reply] : http://www.research.att.com/~bs/bs_faq.html All about C++ http://www... (by bluezor)
Multiple operator definitions
 
Hi I have a very simple test case which I am trying to solve. I have the following classes and file...
[2 replies] Last: Okay it seems I was having one of those days. It probably has somethin... (by jamesm6162)
how to pass character array into and return it from function
 
I am having a problem where cant pass all my keyboard input into a function using character array an...
[9 replies] Last: Means where should i make the correction ? Please guide me... (by nsw1216)
by fi3
calculate total resistance value
 
somebody can help me to write a C++ sourcecode for me The question ask to calculate the total resis...
[4 replies] Last: It does not seem to me that you really understand the problem. What... (by turbozedd)
by Freon
auto_ptr assignment
 
Does anybody know why auto_ptr transfers pointer ownership on assignment instead of making assignmen...
[4 replies] Last: Because you might want to transfer the assignment like this maybe: ... (by firedraco)
My error message: error C2659: '=' : function as left operand
 
I'm not quite sure why I'm getting this message. This is my whole code: #include<iostream> #in...
[4 replies] Last: Function as left operand: #include <iostream> using namespace std... (by Duthomhas)
Reading data from a file character by character to find word count
 
I need to have my program open a file and output how many words there are in the file. The catch is ...
[12 replies] Last: stil not working :/ anyone know how i can fix it? This is what i cha... (by Soujirou)
by R0mai
nested template syntax
 
What is the correct syntax here? template<class T> struct s { template<class U> voi...
[4 replies] Last: Well, I never thought this could be valid. Thx Bazzy (by R0mai)
Counting 1 Word in Array C++
 
Hello, This is my first post. I'm learning C++ right now, and I have an assignment with two program...
[3 replies] Last: #include <iostream> #include <string> #include <cstdlib> #includ... (by mcleano)
Pointers to a class with attribute Vector
 
Hello all, Am stuck with pointers concept a bit. class myclass { stl::vector<double> list...
[5 replies] Last: It should work, but only if myptr still points to the beginning of the... (by helios)
October 2009 Pages: 1... 7891011... 17
  Archived months: [sep2009] [nov2009]

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