General C++ Programming - April 2015 (Page 17)

Error codes.
 
This is what I'm trying to do: Your new cell bill program must use 3 functions with parameters, as follows: function calcRegBill – accepts one inte...
[3 replies] Last: Note: I didn't understand your formulas to calculate the bill. Why did... (by digital D)
by avade
Help with simple exception handling
 
I need help understanding why the exception handling is not activating with this code. When I input a letter instead of a number, I get a runtime error. ...
[5 replies] Last: The simple solution would be: if ( !(cin >> x) ) throw 1... (by cire)
Introducing Colony - a vector-ish C++ container without pointer/iterator invalidation
 
Hi all- in case any of you are interested, this is the vector-like container I've been working on: http://www.xpfree.org/plf/plf_colony.htm Because of the ...
[2 replies] Last: Have you tried also comparing to std::list and std::multiset in yo... (by LB)
Help with looping!!!
 
There are a lot of errors in my code that will not let the program run. It asks the user to enter the code of the item purchased by the customer. If the use...
[3 replies] Last: what is bPen initialized to? (by erbisme4)
Problem with running .exe
 
Hi guys The problem I have today is probably a pretty simple one. If I open up my project in codeblocks it compiles just fine, but if I want to run it by goi...
[2 replies] Last: Thanks Disch! moving the folder with the images and sounds into the de... (by HalfNOoB)
Trying to run an program from within a visual C++ 2010 program
 
I am trying to call an exe from within a visual c++ 2010 program. I need to pass in parameter that indicates which environment to use, ie dev, QA or product...
[2 replies] Last: I'm pretty new at C++, can I use a variable for the <yourapp.exe> and ... (by doozer45)
Overloading
 
I have to overload the operator and im having some trouble #include<iostream> using namespace std; class clock { int secs; int hours(){ r...
[4 replies] Last: It just has to add up the times given...I'm understanding it a little ... (by ArtisticMess)
Including header file in a header file
 
Suppose there are two classes that I wrote - a base class and a derived one - in separate header/cpp files: BaseClass.h: class BaseClass {....} Derived.h...
[4 replies] Last: Yes, of course I mean the other way around. Stupid me! (by Peter87)
C++ Rest Client
 
Just a simple REST client for use with C++. This was a quick weekend hack to use some C++ while making something remotely useful, it might not be idiomatic C++ ...
[2 replies] Last: Thanks for the comments. I will definitely be doing some re-factoring ... (by nexus13)
by gtsiam
C++ operator types implicit conversion
 
I have a String class defined as: class String { public: String(); //[...] //These methods concatenate a String with a number String& operator+=(cons...
[6 replies] Last: thanks for the help. as for my operator+: String& operator+(const fl... (by gtsiam)
Nested loops
 
QUESTION 3: NESTED LOOPS Company ABC employs a number of salesmen to sell a variety of items. These salesmen earn their income from a commission and are paid ...
[3 replies] Last: #include <iostream> using namespace std; int main() { int numSale... (by lmptitfy)
by Gyiove
problems g++ (64bit) compiler ( const char * to char * etc... )
 
Hi everyone! All my programming time i have spent programming on windows and using microsoft visual c++ 2010 Since i felt that i need linux i started coding a...
[3 replies] Last: C++11 and above has standardized threading facilities: http://www.cplu... (by LB)
Test Data
 
I got a program about GPA calculator. I need to come up with 5 sets of test data. How shall I do it. I know it must be in table form which includes int input, p...
[14 replies] Last: thank you dude. (by vikramathitan)
void function
 
#include <iostream> #include <cstdlib> using namespace std; void printDescription() float computePaycheck(float,int) int main() { float pay...
[1 reply] : Please edit your post so all of your code is between [co de]code ... (by TarikNeaj)
Unexpected results when trying to copy an array
 
Hi, this is an exercise for a c++ class. I'm trying to create a shallow copy of an array. According to the book, the last line printed out should be the same ...
[2 replies] Last: Albatross, Thanks for the help. I think I see the problem in line # ... (by cmt9000)
by anhnha
set zero for inside of a curve (1,2)
 
I am doing some C++ code relating to image processing. Here is a picture of an image (let's assume it is a gray image). Each small rectangle here is an pixel a...
[20 replies] Last: Hi, It works now. I changed the code so that I can fill all point insi... (by anhnha)
Reading scores from a file
 
Hello :) I need someone to check my code for errors, thank you. Write a program that reads a student name. and 2 test scores from a file and prints the thre...
[1 reply] : line 20: fin is not opened. line 21: A . is missing. line 24: ver... (by coder777)
by dxj
material of this site
 
Who have the material of the site?Please give me download addresses. Thank you
[no replies]
need help with my code
 
#include <iostream> #include <fstream> #include <cstring> #include <iomanip> #include <cstdlib> using namespace std; typedef struct { char isbn ; c...
[no replies]
Binary Search Tree Help
 
I can't get the output right. Instructions: Given array: string Months ={"JAN","FEB",......"DEC"}; write a program to (a) insert data in array Months to a BS...
[1 reply] : DisplaySideways(p->right, space + 6); cout << string(space, ' ') << p... (by fg109)
April 2015 Pages: 1... 1516171819... 28
  Archived months: [mar2015] [may2015]

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