49,761 Topics
| |
| |
Okay this program is really pissing me off! After line 95, the member variable is suddenly getting changed (That is, the 2nd string). Even after looking at it for 3 hours, I've failed to crack it :( Please help me out guys! [CODE] # include <iostream> # include <cstring> using … | |
Good evening! I am currently working with a program that does basic arithmetic with polynomials that can have rational coefficients. I was able to come up with seperate classes and implementation files for my two classes, Polynomial.h and Rational.h. I can run two different programs, one for each class, fine. … | |
Hi all, My title might not describe this problem as well as it could, but I'm not sure what area this problem falls under. I have a simple base class and derived class as follows: [CODE] class BaseClass { public: BaseClass() { parameterA_ = -0.0; parameterB_ = -0.0; } virtual … | |
Good afternoon, i'm getting an error when I compile "undefined reference to 'TestScores:theAverage(int *,int)" I'm not sure what the compiler is telling me. Any assistance is welcomed. Art header // this is the header file for class TestScores #ifndef TESTSCORES_H #define TESTSCORES_H //this idea with this class is to take … | |
I am learning C++ from the Stroustrup book "Programming Principles and Practice". I have been doing the exercises in each chapter. I have gotten stuck on chapter 6. I understand the concepts of classes, constructors, functions, and 'throw and catch' error handling, but seemingly not well enough to actually write … | |
I am writing this program for class and it compiles fine but when i debug it it gives me an assertion failure any suggestions would be welcomed i need it to output 20 random sentences. [CODE]#include "stdafx.h" #include <iostream> #include <cstdlib> #include <ctime> #include <cctype> using namespace std; const char … | |
i have a program in which i have to input 2 2-d arrays and then compare the elements of both. executing for loop again and again is making the program long. can i make it short. can we pass an array into a function? | |
I have a code wherein I pass a whole array to a function. Is it possible to do exactly the same thing using pointers? [CODE]#include <iostream> using namespace std; void func(int array[]); int main() { int array[] = {10,20,30,40}; func(array); cin.get(); return 0; } void func(int array[]) { cout << … | |
I've done an example of 'template specialization'. Here is the code: [code] // template specialization #include <iostream> using namespace std; // class template: template <class T> class mycontainer { private: T element; public: // only prototype mycontainer (T); T increase (); }; // class method definition template <class T> mycontainer<T> … | |
Wanting to create an error handling function, I want it to return the line without having to pass an int value for it. I've seen functions given to me in books and so forth do it, but I have no idea how to get that value. | |
HELP PLS WITH MY Project i am a beginner in programming pls help me . read the machine problems plssss>> any body>> thank you | |
can u please help me? this was my teacher's project for us! i really dont know what to do! | |
Hi, I have a structure defined in my header file as follows: [CODE] struct TestInformation { int TestPointer; // pointer to the selected test long TestPointerValue; // the value contained within the pointer long TestSize; // the size of a test char *TestText; // the text contained within a test … | |
hi i am new to c++...i have a learnt a lot about the basics. i now want to procede to the graphics part. i dont know even a little bit of the graphics part....pls help me.. i am using dev C++ | |
So I have a program I need to make which involves an array. It builds fine and runs. Right now I just need to get the array to read in from file then print it on screen. But only a little over half the array prints (the last half). format … | |
i get non accuracy result for using simple(* + -) and complex(sin cos pow) math function in std. someone know very accuracy for math actions? | |
i want to be able to read input from a file and find like entries and then add the corresponding data. i dont know if i explained that well so ill give an example... the file would be like this (just example numbers)... [CODE] 111111 15 222222 6 111111 4 … | |
Hi I was looking for some ideas and techniques on developing an antivirus engine. Not really sure how the code should go, or how the program will scan the system. Please state any ideas, or ways to approach the engine development. Thanks. | |
I'm a newbie in programming, maybe somebody can help me on this. | |
i wanna ask..what is the equivalent syntax for contructors in c++? | |
Hello. I'm writing program wich reads from file line by line and then rewrites everything to other file. This is simplifyied part of code: [CODE]for (int i=0; i<=5;) { getline (file1, str1); /* file1 is file from wich i read and str1 is string*/ file << str1; }[/CODE] No i'm … | |
I have been advised by many people that it is better to use integer return type for main function instead of void ! I actually dont understand what return 0 means .. main returns 0 value to program ! What does that mean ?! Could you please help me understand … | |
I'm getting weird letters and numbers when the array is being shown. What is the problem? I've initialized array1 with 10,20,...etc. So shouldn't it cout those numbers? [CODE] #include <iostream> using namespace std; void reverseArray(int[], int); int main() {//start main const int size = 5; //constant size of array is … | |
I'm new to work on image processing using c++, well someone suggested me to use cimg library. i downloaded it and now i'm not getting how to work in turbo c using this library. i added cimg header file to turbo c header files.but its not working... can any one … | |
Hi guys, i want to read a file backward using iterator pls any explain me with sample code | |
Why doesn't the if else statement work? Please help... [ATTACH]16773[/ATTACH] | |
[CODE]#include <iostream> #include <string> #include <ctype.h> using namespace std; void isphone(int number) { bool isphone = false; int size2= number.size(); for (int i=0; i<size2; i++) { if(isdigit(number[i])&& size2>=4) { isphone=true; } else isphone = false; if(isphone=true) { cout<<"yes this is a phone number"<<endl; } else cout<<"Invalid number!"<<endl; } } //for … | |
is there someone who can help me? i need a c++ program of any sales system. badly need it. asap ! for my case study any1 there willing to help. thnks a lot guys ! | |
I am currently assigned to teach programming subjects for college students... however, I am not a computer science major, I just knew some programming, can you help me in coming up with a credible, and standard series of topics to be discussed? |
The End.