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

by mnunez
ARRAYS
 
mmm
[3 replies] Last: You could start by paying attention in class so that you don't have t... (by mcleano)
by JRevor
Template inheritance problem.
 
This error apparently makes no sense. Check the code, the error is marked. template <class KEY> class PrimaryIndex { protected: int nEntries; ...
[5 replies] Last: Thanks a lot! Also, thanks for the links, Disch. (by JRevor)
by cpp123
could not fiure out why this program does not terminate properly
 
const int MAX_SIZE = 5; #include <iostream> #include <string> using namespace std; template<class ItemType> struct NodeType { ItemType info; NodeT...
[2 replies] Last: you are not decreasing the length variable in the destructor. include... (by vvadan)
101
 
#include<iostream.h> //#include<string.h> main() char f ; char s ; char m ; char c; cout<<"Please enter the character in the first array:"; for(c=0;c<1...
[3 replies] Last: Sonia, I dont know exactly what you are trying to achieve, but hope t... (by vvadan)
Question on the class
 
const A& A::operator=(const A& rhs) { int k = rhs.get_k(); /*.....other operation.... */ } error C2662: 'A::get_k' : cannot convert 'this' pointer ...
[2 replies] Last: Oh, actually for your problem I think you need to declare get_k() as a... (by Galik)
Structures initializer
 
1) In short this would work: struct s_months { char const *name_; // char const name_ ; int days_; }; s_months const smonths = { ...
[2 replies] Last: Thanks .. I understand now about why that format couldn't be as a mem... (by yapkm01)
Problem defining variable in value returning function
 
Hello, I'm working on a program with value returning functions and I just can't seem to be able to define each of my symbols for the set of problems my program...
[2 replies] Last: yea, you are reading me correctly and thank you, i put in the switch s... (by Soujirou)
Damn classes not working
 
Well, I made a simple program to exercise my OOP learnings, but when I compile it, I get an error. Here is the code: #include <iostream> using namespace...
[2 replies] Last: Passer is a member function just like Result. You have to call it the... (by jsmith)
by NGen
'Force Grid' Algorithm
 
In the game 'geoDefense', there is an effect that I'd like to call the 'force grid' algorithm. It's somewhat hard to explain, so here's a few images: http://...
[no replies]
Random Number Generator Interval
 
I have this code , so the point is when the pc choose a random number and it's too small/big , it sets to be the edge of the interval of generating a random num...
[2 replies] Last: thanks for help. (by Samuray)
inserting random integers to a vector
 
I am writing a function that calculates the time that is needed to add a number of integers which i have specified in main...However i want that the integers th...
[no replies]
by Khaizz
some can do this ?can show me the example??
 
You are asked to create two classes: a)Class Course with attributes course code and faculty code b)Class student with attributes studentID, name and an object...
[2 replies] Last: o...sorry .... (by Khaizz)
Class Inheritance dilema
 
By what I've understood on this website's tutorial, it contradicts it self on the section Class Inhertitance. A quote of what it says before and after: Befor...
[3 replies] Last: good one.. :) (by writetonsharma)
Overloading operators
 
Well, is there ANY concrete use for overloading operators? I mean, is there something that can ONLY be made using overloaded operators? I'm asking this because ...
[4 replies] Last: Having operators overloaded would make template functions work better:... (by Bazzy)
functions with structures
 
I am not able to have two functions with same name but different structures as its parameters. Why so? For e.g. #include <stdio.h> struct temp{ i...
[2 replies] Last: Your code should work fine in C++. Maybe you are using the C compiler?... (by Galik)
C Threading Library
 
Anyone know of any C cross-platform thread libraries?
[8 replies] Last: If you mean C++ then the boost library has cross platform thread suppo... (by Galik)
IDE (MVS 6.0 vs 2005, 2008, 2010)
 
Hello everyone! I was programming in C++ using Visual Studio 6.0, I liked it because it does not crate tons of files and your project folder stays “clean”. ...
[12 replies] Last: VS6.0 had several non-standard scope resolution situations as well... ... (by jRaskell)
by QiongZ
linked list template class doesn't compile
 
Hi, I just recently started studying C++ and basically copied an example in the textbook into VS2008, but it doesn't compile. I tried to modify the code by elim...
[6 replies] Last: Thank you jsmith. That did the trick! Also thank you kbw for pointing ... (by QiongZ)
Copying names into a array
 
Folks, I'm faced with this very simple but challenging problem that I need to implement in a chat client I am developing. The sub-task I'm trying to solve is s...
[2 replies] Last: Great insight. Thankyou. Works like a charm. (by abhiiyer102)
Objects and pointers Problem
 
How do I delete a post!?
[4 replies] Last: Better to use #if defined(_MSC_VER) && (_MSC_VER >= 1200) #pragma o... (by Zhuge)
November 2009 Pages: 1... 7891011... 16
  Archived months: [oct2009] [dec2009]

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