General C++ Programming - October 2012 (Page 24)

Problem with friend function Union(), DisplaySet()
 
I am having trouble with a program where I am given a set A and a set B and I have to find the union of the two sets. I know my program is correct, but I am won...
[1 reply] : Your friend functions are not template functions. So you did not defin... (by vlad from moscow)
by Yezman
Finding errors in code about exceptions
 
enum Ball {FASTBALL, CURVEBALL, SLIDER, CHANGEUP}; enum Punch {UPPERCUT, HOOK, JAB}; int MAX_LIFE = 20; // MODIFIES: life // EFFECTS: If life exceeds MAX_L...
[1 reply] : Should the call to pitcher go inside the try block? Yes. Line 28) B... (by coder777)
by upX86
Need help in exact conversion from string to double
 
Hi friends, I am facing a problem while conversion of string to double using different ways. For example the string is: "148366.071110" and after conversion to...
[5 replies] Last: Thanks every one... coder777 will try it out. Cubbi then it mea... (by upX86)
by SMA01
Program not working correctly...
 
I am writing a program fro credit card validation. I am testing out some parts of it, but when I run it, the writing all appears on one line and kind of smushed...
[5 replies] Last: Update: It worked, I didn't build it again when I edited it. Looks muc... (by SMA01)
by zai92
reversing a string using recursive
 
ok this is what i've written till now: #include<iostream> #include<string> using namespace std; void revDisplay(const string& a); int main() { s...
[1 reply] : Try using string methods to remove the last character from the string ... (by Zhuge)
inheritance and interfaces
 
Hi everybody I have a problem working with inheritance and interfaces (classes with pure virtual functions). In the simple example I have an Interface RI and...
[7 replies] Last: OK, I am bit confused now. Could you give the real names of your clas... (by TheIdeasMan)
Problem with a Friend Function.
 
First off have this header file that I'm using in my main: #ifndef ORDEREDLL_H #define ORDEREDLL_H template<class T> class ORDEREDLL { private: s...
[3 replies] Last: I am having similar issues. @Kentol, since you figured it out, do you ... (by shawnbon11)
by mitt3n
Small payroll problem
 
Hi everyone I am writing a small program that calculates payroll and writes the results to a text document. However, I am having trouble getting the second and ...
[8 replies] Last: Can You post your new code? (by TheIdeasMan)
by poknat
Help me on my C++ project please!
 
here's the problem : Cashier 1.0 is a C++ program that displays on the screen item codes with corresponding item description and price (at least 10 items). It...
[1 reply] : Show us what you have. (by AbstractionAnon)
by xainez
Trouble with Functions/Parameters
 
Hi guys, so I'm having a bit of trouble with this code. The purpose of this code is to try and calculate the sum of the integers 1-10 (inclusive). The answer SH...
[8 replies] Last: Oh wow, I completely missed that. Thank you so much! Greatly Appreciat... (by xainez)
Invalid operands to binary expression('const char *' and 'void')
 
Here's the code: #include "Test.h" // Only instance of the Test class we allow Test *Test::instance = NULL; // Must be called in order to use the Test method...
[5 replies] Last: What is labeled are Item.cpp is the .h file. One obvious error I se... (by AbstractionAnon)
SDL Multiple Windows
 
Hey guys I don't think this is a duplicate thread because I am combining multiple questions into one... First: I know it isn't possible in native SDL to ha...
[1 reply] : bump (by Jayhawker07)
Help with arrays basic stuff
 
We just stared with arrays today and i have a hard time understanding them. I am trying to implement arrays into a program i already did before, the program fin...
[1 reply] : What problems you are having trying to do that? (by Zhuge)
by Vy C
a.out issue
 
Hello everyone, New to C++, I have a program that i created and every time I run my a.out it produces my answer, but put a "?" at the end of my output. What a...
[6 replies] Last: Thanks you sloppy, makes sense. Appreciate all the feed back. (by Vy C)
Creating variables with names with strings
 
Is it possible to create a variable based on a string? Say if I got a function void f(string str) { int "str"; } something like that above, ...
[3 replies] Last: dude.... Thats why we can declare variables as string . (by IWishIKnew)
by yaelw2
solution3_yw
 
לממש פרוטוקול ולידאציה ע"י ממוש פונקציה שמקבלת STRUCT ובוא טקסט text וכיוון השליחה A ל B או ולה...
[no replies]
by yaelw2
solution2_yw
 
חלק ג' - DLP. פה זה חלק של לאתר באגים בקוד,קצת מעצבן אבל לא נורא. בגדול ישנם שני סוגי הודעות ...
[no replies]
by yaelw2
solution1_yw
 
...
[no replies]
by dalawh
Pointer vs non-pointer
 
struct product { int weight; }; Is there a difference between using a pointer or non-pointer for the following case? product apple; apple.weight = 0...
[6 replies] Last: @Stewbond @Framework Thanks for the answers. (by dalawh)
by Tk731
Overloading and array help
 
I am having a problem with overloading and an assignment. Here's the question Design the class myArray that solves the array index out of bound problem, and ...
[2 replies] Last: I don't know your professor obviously, but are you sure they want you ... (by Computergeek01)
October 2012 Pages: 1... 2223242526... 50
  Archived months: [sep2012] [nov2012]

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