49,761 Topics

Member Avatar for
Member Avatar for Sallad

I know that you can make a derived class object equal to a base class object, but I don't know how to do it the other way around. Here's the part of my code that I'm having difficulty with (Note: Animal is base class; Lion and Dog are derived classes). …

Member Avatar for kbshibukumar
0
145
Member Avatar for ahvicm

how can i insert the code for entering a password here?? the password should be in the main window...and it should be replaced by asterisk...HOW??? tnx [code] #include<stdio.h> #include<conio.h> #include<dos.h> struct phone { char name[20]; char ad[40]; char ph[20]; }; struct phone ar[100]; int n=0; void wfile(); void rfile(); void …

Member Avatar for tux4life
0
84
Member Avatar for FrancisC07

hi! ^_^ i am very confuse on how to edit an external file? can someone tell me?

Member Avatar for skatamatic
0
94
Member Avatar for sid78669

Following is a function I wrote to get a line of definite length from a long string. The line is also word-wrapping to make sure no words are splitted: [CODE=C++] char * getLine(char * str, int length, int start, int lenSent){ int index = 0, //Index number of the current …

Member Avatar for sid78669
0
140
Member Avatar for endisbegun

so...i dont really understand my project -_- the teacher is asian as am i but he does not write english very well :3 can i get some hints maybe? ^_^ thank you i really appreciate it ive been stumped for such a long time :O "I typed the following 2 …

Member Avatar for endisbegun
0
92
Member Avatar for atreides27

now...like...i need to concatenate the two words that the user enters, s1 and s2 and output them...i thought i needed to use strcat but like...i dont really understand how to do that here, do i need to make a new c string variable or...? ah i hate this stuff lol …

Member Avatar for SeeTheLite
0
143
Member Avatar for OffbeatPatriot

I'm trying to make a program to view 3d volumes. Basically you start with a bunch of data from an ultra sound or mri and then you load it into a 3d texture. Then you have a cursor made of three components between 0 and 1, and when you draw …

0
62
Member Avatar for ARYT

It's me again. :?: This is the question: Write a computer program that computes the temperature of a gas that is originally at P=5 atm, =V30 Liters, T=273 K. Solve the problem using one dimensional array only. Assume number of array elements is unknown (use the end of file function). …

Member Avatar for Ancient Dragon
0
218
Member Avatar for f.ben.isaac

[CODE] const char* findThisMsgInMem = "Hello World! Everyone is Happy"; if(memcmp(&dataInMem[i], findThisMsgInMem, defaultMsgSize) == 0) { memcpy(&dataInMem[i], newMsg, strlen(newMsg)); //more code here }[/CODE] This is first time for me trying to use malloc, and realloc. Please see the coding example for illustration purposes. Don't worry of this lengthy question, most …

Member Avatar for f.ben.isaac
0
501
Member Avatar for greg022549

I am enclosing my code and as you can see below the Event Recorded Banner the event type will not display. I would appreciate if you could show me what my problem may be. Everything else works properly. I am stuck. [code=cplusplus] #include <iomanip> #include <cmath> #include "EventBooker.h" EventBooker::EventBooker() { …

Member Avatar for VernonDozier
0
121
Member Avatar for orwell84

I have a problem with a program I'm writing. It's supposed to find the factorial of the number you input, but it's not. The problem seems to be that the recursive function isn't...well...recursing. Right now, when compiled, the program multiplies the number by the number before it. So if it's …

Member Avatar for orwell84
0
158
Member Avatar for Takafoo

So I have the below code to check the input, I'm just having trouble because apparently flushing the input causes the tests (its an assignment) to lock up and I need to manually break out of it. The problem is that if I remove the flushing of the input it …

Member Avatar for Takafoo
0
126
Member Avatar for Dragonsfire

So, I'm attempting to write an object oriented program that solves simple sudoku puzzles by checking the rows, columns, and the 3 x 3 grid. [code] #include <iostream> using namespace std; #include "doth.h" int main() { User file: Sudoku call; int flag=0,ptx=0,pty=0; call.Display(); for(;flag != 1;) {[COLOR="Red"] if (Puzzle[ptx][pty]==0) { …

Member Avatar for Dragonsfire
0
92
Member Avatar for trixymix31

Hi, I have a homework problem in where I have to count the vowels from a readin file from a flashdrive/harddrive. Then the amounts of each vowel has to be displayed & which occurred the most amount of times & which occurred the least amount of times. Extra credit (which …

Member Avatar for trixymix31
0
96
Member Avatar for Lukezzz

I have a little problem. I have a lot of code in the backgroundWorker2 (//Do Stuff) When pressing the button1_Click, everything works great and the code executes for the backgroundworker. But if I now try to drag the form around on the desktop, the form will "get stuck"(Not Responding). It …

Member Avatar for Lukezzz
0
73
Member Avatar for SUD

I am new to C++ and attempting to complete an exercise my question is How you can use cin.ignore to ignore every character up to and including a specified character – for example a full stop, ’.’.

Member Avatar for William Hemsworth
0
855
Member Avatar for Azurkan

So A friend and I are new to C++ and we are trying to create a sudoku project and are trying to figure out different ways to do so. Right now we are stuck at the repetition checking. I was wondering if anyone could help us out?? We are trying …

Member Avatar for nucleon
0
96
Member Avatar for jimjohnson123

I am at work and did this program on notepad and not sure if this is correct or not. Can someone that has the visual studio compiler test this and let me know if it works. If it does no could you offer any minor feedback on the location of …

Member Avatar for nucleon
0
147
Member Avatar for Talguy

I'm new to threading and wanted to make a program that was going to receive data from two separate pieces of hardware and populate a queu with their data. I then wanted to pull the data out of the queue and draw it to the screen graphically. So each piece …

Member Avatar for Talguy
0
118
Member Avatar for neox183

I was given this assignment to create a function and have the user input a number and the function is suppose to give you the amount of change back. My program is listed below [code] #include<iostream> using namespace std; int change(int,int& ,int& ,int& ,int& ,int& ,int& ); int main() { …

Member Avatar for neox183
0
89
Member Avatar for daviddoria

I was reading about the new "tuple" type coming in c++0x, and I decided to try it. I saw that if you give a compiler flag -std=c++0x it will work. So I did it, and then #include <tuple> works and everything was good. Then I decided to try the default …

Member Avatar for daviddoria
0
83
Member Avatar for nito28

For this assignment you will write a wrapper routine for the LAPACK routine DGESV to solve the system of equations Ax=b (where A is a num by num matrix, and x and b are vectors of length num). A wrapper is a routine that reformats (or supplements) it's arguements in …

Member Avatar for StuXYZ
0
131
Member Avatar for nito28

For this you will write a Gaussian Elimination routine (with or without pivoting - for most of you, I highly suggest without) that solves the equation A x = b where A is a square matrix (num by num), and x and b are vectors. A and b are known, …

Member Avatar for Lerner
-1
182
Member Avatar for daviddoria

Is there a built in type to store UNordered pairs? ie. I want these [code] pair<double, double> a(4.0, 5.0); pair<double, double> a(5.0, 4.0); [/code] to be equal. Do I have to make a wrapper and override == ? Thanks, Dave

Member Avatar for DemonGal711
0
140
Member Avatar for erialclaire_238
Member Avatar for daviddoria

I often have this situation [code] class OrientedPoint { private: Point P; Vector N; Color C; bool valid; public: //////////// Constructors ////////// OrientedPoint() {} OrientedPoint(const Point &Coord); OrientedPoint(const Point &Coord, const Vector &Normal); OrientedPoint(const Point &Coord, const Color &C); OrientedPoint(const Point &Coord, const Vector &Normal, const Color &C); [/code] where …

Member Avatar for daviddoria
0
120
Member Avatar for raymyster

Use the stack class in a program that reads a String, one character at a time, and determine whether the String contains balanced parentheses, that is , for each left parenthesis ( if there any ) there is exactly one matching right parenthesis later in the String . so the …

Member Avatar for VernonDozier
0
294
Member Avatar for 2009march

trying to write a program in C++ that will take a DC voltage as an input into a PIC16F88 (18 pin). and will output 2 seperate voltages, to run two different motors. when the input voltage is greater then 1.5v it will output a small voltage to both outputs, and …

0
49
Member Avatar for daviddoria

Is pthreads still the way to go to detach a process from the main thread in linux? It seems seems kind of convoluted/old/c-style from looking at some examples - is there a more "c++" way? Thanks, Dave

0
48
Member Avatar for FrancisC07

The End.