49,761 Topics
| |
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: … | |
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? | |
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 | |
What does it mean ** before the function and what should return | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … | |
hi! help me.. Construct a c++ program that will accept the integer value. The program will get the factor of the integer.. | |
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.. | |
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] … | |
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. … | |
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 … | |
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 … | |
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 … | |
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; }; … | |
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 … | |
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]; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 :) | |
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? | |
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 … | |
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 << … | |
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] = … | |
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; … | |
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 << … |
The End.