49,761 Topics

Member Avatar for
Member Avatar for gilly231

I need help with an assignment for my programming course. I have three classes A,B,C. all stored in one array. (These are not my real classes there are just a guide) [CODE=c] Class A{ char name; public: virtual print(){ printf("%s",name); } } Class B : public A{ char middleName; public: …

Member Avatar for gilly231
0
193
Member Avatar for Freude

Hello, I have a problem using the member function attach several times. Compiler does not find error, however only one curve appear that does not satisfy me. Is it possible to attach several curves to QwtPlot object?

Member Avatar for Freude
0
1K
Member Avatar for tshepomaz

I need projects to start a portfolio In C++ and Java programming. need to get experience and get a portfolio that will get me hired got the qualification but no experience. PLEASE HELP

Member Avatar for tkud
0
89
Member Avatar for Eddiebauer
Member Avatar for Eddiebauer
0
191
Member Avatar for petmol

Hi everyone, I can't get this program to compile. It has something to do with brackets in the wrong place(s), but I just can't find what's wrong. Help, anyone? [CODE]#include <iostream> #include <string> #include <sstream> #include <conio.h> #include <ctime> #include <iomanip> #include "iodos.h" using namespace std; // Funktionsprototyper -------------------------------------------------------------------------- void …

Member Avatar for VernonDozier
0
207
Member Avatar for jay200032

Hello guys, I'm quite new to C++, I'm trying to achieve a task whereby i could read from a csv file and write to that same file and vice versa depending on the user's selection. This is what i did: [B]Here's the data already on file[/B] 1,Mickey,23,090,Girne,TRNC,465 2,Charles,23,090,Girne,TRNC,465 3,Species,23,090,Girne,TRNC,465 4,Moody,23,090,Girne,TRNC,465 …

Member Avatar for Ancient Dragon
0
305
Member Avatar for SDH1

I revised a code i found on the net. It doesn't print/output "0 1 2 3" when running it?. any potential bad errors?. [CODE]#include <iostream> #include <windows.h> class Thread { public: Thread(); static void * EntryPoint(void*); int Start(); int Run(int arg); void Execute(int); int Arg() const {return Arg_;} void Arg(int …

Member Avatar for Narue
0
103
Member Avatar for sadia.ab

please write c++ code for this problem it is urgent help.............. Problem Statement: Calculate salary You are required to write a program which will calculate the salary of an employee according to his/her grade assigned by the employer. You must declare a class named CalSalary whose private data members will …

Member Avatar for Clinton Portis
-8
159
Member Avatar for sahil1991

I was implementing this algorithm of parsing a mathematical expression....but dint meet the required result........i have restricted the string to take one digit numeral only i think i am suffering because of this type conversions between int and char...but don't know what to do... here's the code.. //parsing.cpp #include<iostream> #include<conio.h> …

Member Avatar for vinayakgarg
0
104
Member Avatar for mario vincent

hi! help me.. Construct a c++ program that will accept the integer value. The program will get the factor of the integer..

Member Avatar for vinayakgarg
0
96
Member Avatar for hgseric

How do I plot a continuous sine or cosine wave on a Dot marix LCD using C++? Can I have a sample to see? Thank in advance..

Member Avatar for LevyDee
0
318
Member Avatar for TSims11

Hey guys, I'm having trouble with an error message in my code, would you mind taking a look and helping me out? [CODE]private void button1_Click(object sender, RoutedEventArgs e) { if (textBox1.Text == "user" && passwordBox1.Password == "password") { Window2 W2; { W2 = new Window2(); W2->Show; } Close(); } }[/CODE] …

Member Avatar for TSims11
0
162
Member Avatar for GobanToba

OK, I was working on a project where I needed to randomly generate tens of thousands of 1s and 0s. I started noticing it didn't seem very random. To test it out I created an array of 458752 (896x512) ints. Then, I tested by seeing how many 1s were generated. …

Member Avatar for Zjarek
0
159
Member Avatar for ft3ssgeek

Hi guys, It's been forever since I did any programming, and came upon a project where a simple program would speed things up for me tremendously...Basically, I have a folder with thousands of text files in it and I want to add a block of text to the beginning of …

Member Avatar for Ancient Dragon
0
134
Member Avatar for logicslab

Hi pals, I am newbie in C++ Development. I saw a code in a book named "Beginning C++ Game Programming". I have a doubt regarding the Following Working Code. [CODE]#include <iostream> #include <string> #include <vector> using namespace std; //returns a reference to a string string& refToElement(vector<string>& vec, int i); int …

Member Avatar for Fbody
0
129
Member Avatar for Kakashi Hatake

I have a few been studying OOP for some time. I keep reading in almost every book that OOP was developed in order to write more complex software and has many features not available in procedural programming like code re usability, security, modularity, encapsulation etc. I haven't developed any real-world …

Member Avatar for mike_2000_17
0
199
Member Avatar for vanalex

Hello everybody! I wrote an example about a copy constructor and the result wasn't what i expected. Here's the example: [CODE] #include <iostream> using namespace std; class A { public: A(const A& cp); A(double t[], int size); ~A(); double *getTab() const { return tab; } double *tab; int size; }; …

Member Avatar for vanalex
0
149
Member Avatar for Akill10

How can I do this? I'm not even sure what the problem is so I can't really search google. Why is this not possible?: [CODE] #include <iostream> #include <cmath> using namespace std; void vGameLoop(); void vDoMenu(); void vDealMenu(); void vDoDeal(); int main(){ vGameLoop(); return 0; } class CCards{ const int …

Member Avatar for Akill10
0
135
Member Avatar for AmerJamil

i have to declare an integer array, float array ,and character array of 85020 indexes..when im declaring it ..my compiler is giving error that array size is too large. please tell me how can i declare array of this size. [code] <iostream> <conio.h> int main() { int a[85020]; float b[85020]; …

Member Avatar for Ancient Dragon
0
171
Member Avatar for Jelte12345

I have written a program in Visual C++ Express. I have finally finished and that's why I wanted a release version of my program. To give to some of my friends. There was no problem when I used the compiler to create the debug version. But when I run the …

Member Avatar for Jelte12345
0
160
Member Avatar for gregorynoob

okay, i don't have a problem coding the game... that part would be easy. but the problem is to output the lease number of rotations needed to complete the game, so for example... 123 => 413 456 => 526 789 => 789 (rotation of the top left corner) that's what …

Member Avatar for frogboy77
0
164
Member Avatar for Diogo Martinho

Hey I'm trying to set a Strategy in my program that should allow me to do something I've never tried before and have no idea if it's either the best approach to the problem or if it is possible or not. I have a class with some fields and one …

Member Avatar for arkoenig
0
76
Member Avatar for gth759k

I need to create and array of DIFFERENT kinds of objects. For instance, in Java, I can do something like this ... [CODE] // scene objects Sphere scene_sphere = new Sphere(); Plane scene_plane = new Plane(); Object[] scene_objects = {scene_sphere, scene_plane}; [/CODE] in my program, both the Sphere class and …

Member Avatar for vijayan121
0
2K
Member Avatar for AmerJamil

Hello all.. can any one please tell me..that how many null(s) i.e '\0' are in 2-Dimensional character array?? thanks. your quick response will be highly appreciated :)

Member Avatar for mrnutty
0
55
Member Avatar for knotholaze

double i,j,k; k=(i%j); The program generates a error in second line and compiler show a message I can not use % in double variable. But I need to separate the each digit of a double variable how I can do this?

Member Avatar for vijayan121
0
121
Member Avatar for red88formula

Been doing a lot of reading picked up beginning c++ through game programming and c++ the complete reference 4th edition I haven't gotten very far into each of these, but I have managed to make a gui in c++. what I am wondering is how to retrieve data entered into …

Member Avatar for JSPMA1988
0
75
Member Avatar for mbouster

Dear all I have the following code [CODE] void initializeData() { Customers *CustArray; CustArray=new Customers[150];//allocate 150 memory locations of class Customers Flights *FL=new Flights[150]; } /*End Initialize Data fuction*/ /**********************************************************************************************************************************/ /*Backup Menu implementation*/ void backupfiledefaultfilename() { ofstream file_ptr; // Declares a file pointer. file_ptr.open(“backup.bak”, ios::out); if (!file_ptr) { cout << …

Member Avatar for chikkupa
0
107
Member Avatar for richyvr

I am new to templates and trying to implement Templates for creating ITK images: template <class T,int D> itk::Image< T, D>:: Pointer CreateITKImage(int *pnSize, double *pdSpacing = NULL) { typedef itk::Image< T, D> ImageType; ImageType:: Pointer image = ImageType::New(); : : return image; } void main() { int Size[2] = …

Member Avatar for richyvr
0
130
Member Avatar for mbouster

Dear all I have a function and withing I want to call a member funtion. More specifically I have a menu inplemented the code below. please note the commented line [CODE] case '1': //flightcode(); break; case '2': cout<<"Enter the Customers National Number ID"<<endl; cin>>ni; // CustArray.showCustomers(ni);//given the customers ID break; …

Member Avatar for mbouster
0
2K
Member Avatar for icasta13

The results of this program giving me values that should not be the way it is, it must display the list of numbers... [ICODE]#include <iostream> #include <fstream> using namespace std; void ReadList(int Array[], int N) { ifstream data_file; data_file.open("numbers.dat"); N=10; for(int i=0; i<N; i++) { data_file >> Array[i]; cout << …

Member Avatar for icasta13
0
214

The End.