General C++ Programming - November 2010 (Page 2)

by MeLB
Course Grade Calculation (READ ASAP)
 
Hi I have to Write a program that uses structure to store the following data: Member Name Description studentID Student ID name Student Name programming...
[1 reply] : Well, it seems sort of done. Except that it doesn't work.. problem 1:... (by hamsterman)
error C2663: : 2 overloads have no legal conversion for 'this' pointer
 
Ok I have a class with overloaded functions, and I keep getting this:Error 1 error C2663: 'BSearch<T>::inorder' : 2 overloads have no legal conversion for 'this...
[1 reply] : It's const correctness issues. const member functions can not chang... (by Disch)
by m1ck3y
Simple Blackjack Program - Misaligned Output
 
#include<iostream> #include<ctime> #include<io...
[3 replies] Last: Thanks for the brutally honest response, this isn't my first time arou... (by taylorc8)
by pkjm17
Problem with my loop
 
My problem here is for my simulation the minutes are off. For example, on one of my runs, Person #1 arrives at minute 6, but why does it show them arriving at m...
[1 reply] : I would need a better explanation of the problem in order to help you.... (by taylorc8)
SET OPERATION (UNION, INTERSECTION, SUBTRACTION, POWER SET, CURTATIAN PRODUCT )
 
#include<iostream.h> void main() { cout<<"\t\tIntersection set\n\n"; char A ; //Array for First set. char B ; //Array for First set. char R...
[1 reply] : If you are allowed to use Standard C++ algorithm classes, check out se... (by sohguanh)
Singleton design Pattern
 
Hi, AS we know we have singleton design pattern it means we can create only one instance of single object if somebody change the data member of the through...
[1 reply] : I believe in C++ we can apply a const keyword on a class correct ? ... (by sohguanh)
STL - List
 
The code is for STL - List. May I know what is 'splice' and how to get the answers as 0 & 6 respectively? Tks. #include <iostream> #include <list> using nam...
[2 replies] Last: Ok. I just noticed that I am looking at the output size. List2 size is... (by makan007)
Hexadecimal converter.
 
Hey, I'm thinking of doing a hexadecimal -> decimal/binary converter, binary -> hex/dec and decimal -> binary/hex. And i'm now at the hexadecimal part, but i...
[1 reply] : http://www.cplusplus.com/reference/clibrary/cmath/fmod/ denom / fmo... (by stravant)
by Zaixu
Classes - Class that inits another class
 
Okay so i'm in the making of a project and i got a bit confused. This is what i'm trying to make: http://bildr.no/view/767774 What i'm having trouble unde...
[3 replies] Last: Unless you make all of the classes static you can't make them "communi... (by stravant)
move point along a line
 
Hello, I'm writing some program on a basic vehicle simulator. My vehicle currently compose of two points and from those two points I can calculate slope which ...
[4 replies] Last: Thank you very much for all the reply, I'll try it out. Again Thank y... (by radius0014)
Urgent: getting error while using gsl libraries
 
Hi, I am trying to use gsl libraries for simulation variance gamma process. I am getting this error (error: invalid operands of types ‘gsl_rng*’ and ‘d...
[no replies]
by mprez
Program received signal: “EXEC_BAD_ACCESS”.
 
Hello Everyone, I am coding a class ArrowsCounting which implements a method LineAccounterT(const char * archivos2 ). It should return the Number of arrows...
[3 replies] Last: Hello everyone, i got it i coded my LineAccounter like a vector fu... (by mprez)
by toks
strcmp function error
 
Hello, i am comparing 2 strings using strcmp function. the first argument is a string vector with 10 elements and the second a string. the if(expression) is ...
[2 replies] Last: Care to explain why you are using strcmp? You should be writing if(ta... (by Athar)
by Faff
How to make prog read 2 digit char inputs ?
 
Hello :) Having a little problem with input 2 digit numbers with a char data type. Assume this simplified program : #include <iostream> using namespa...
[6 replies] Last: @Shredded: Thanks for the introduction to cin.break/clear/peek and ign... (by Faff)
My ternary search recursion isn't correct..it's not giving any output
 
I learned about ternary search from wikipedia. I am not sure what they mean by the parameter absolute precision.They didn't elaborate. but here is there pseudoc...
[6 replies] Last: I've solved it..For ur convenience, I'm sharing what was wrong with th... (by prodhan)
How To Repeat It?????
 
How To Repeat that program many many times??? #include<iostream.h> #include<conio.h> #include<cstring.h> class quiz { public: void choice() { strin...
[3 replies] Last: Even that way, scoping of variables can become an issue, and in any ca... (by Kyon)
by pizet
Eulerian path
 
http://en.wikipedia.org/wiki/Eulerian_path Don't worry ... no homework to school. I would just like to make a program that finds an eulerian path through a l...
[no replies]
by pizet
Pointer black magic
 
Hi, I came across a source code which was using a compareing function for quicksort(qsort()). I quite don't understand what it does with the pointers. Can yo...
[2 replies] Last: Aha! Thanks. (by pizet)
by troyan
Binsearch problem
 
Task is to make programm searching in array of structs by num. It's compiled, but gets error when i type what student to find #include<stdio.h> #include<stdl...
[2 replies] Last: int bsearch(int Array ,int down,int up,int X) { int med; do { ... (by pizet)
Creating member objects with arguments
 
I have a class, and for members it have other classes. The other classes take arguments, but the argument data is created in the constructor of the parent class...
[1 reply] : the way to call A's constructor from B's constructor is B() : aObject(... (by hamsterman)
November 2010 Pages: 1234... 21
  Archived months: [oct2010] [dec2010]

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