49,761 Topics

Member Avatar for
Member Avatar for ff4930

I am using Maps from the STL to insert a polynomial. The Key is the exponent and the data is the coefficent. Basically I want to add/subtract and multiply them. I have the addition/subtraction down but when it comes to multiplying I have to add the exponents and multiply the …

Member Avatar for Alex Edwards
0
106
Member Avatar for Linda1

I was doing well in this project until I was trying to do the math problem on the third class. The project is, we are supposed to create a base class of circle and create 2 derived classes The first is sector derived from circle then the segment is derived …

Member Avatar for Alex Edwards
0
77
Member Avatar for salman213

very simple question: what is the most easiest way to do the following I have two variables a=1; b=2; how do I make it that c= a,b so that c=12 I dont want to write [code]c=12;[/code] because a and b change according to user input. Thanks, this should be solved …

Member Avatar for Alex Edwards
0
336
Member Avatar for pixeldude

Hi there.... 1stly sorry for the novice and beginner question but I really need help since I've been get fiddling to figure out the error but still have no idea whats wrong with it...here are's the code I'm using[code] #include <iostream.h> #include <stdio.h> #include <conio.h> #include <string.h> #define MaxSize 100 …

Member Avatar for pixeldude
0
95
Member Avatar for ninjaneer

Hello community. I am writing a program that will use multiple threads to run MATLAB functions inside of Cpp by using the MATLAB compiler to create a DLL. I have already written the MATLAB DLL and I have everything linked up just fine, but now I need to split this …

Member Avatar for Ancient Dragon
0
136
Member Avatar for salman213

Hey, here are two codes and with one slight difference they do different things [B]CODE 1[/B] [code] #include<iostream> using namespace std; int main() { char array[2]; int i=0; while (i<2) { cin>>array[i]; i++; } cout<<array[0]<<' '<<array[1]; } [/code] [B]EXAMPLE OUTPUT:[/B] [code] two words t w [/code] [B]CODE 2[/B] [code] #include<iostream> …

Member Avatar for salman213
0
145
Member Avatar for totaljj

Below did not work. Is there anyother way? #include<stdio.h> #include<math.h> const int No=2; int* mat_sum(int[][No], int[][No],int); void main(){ int A[No][No]={{0,2},{0,1}}; int B[No][No]={{0,1},{1,0}}; int *Result=0; Result=mat_sum(A,B,No); } int* mat_sum (int A[][No], int B[][No],int length){ int *C=new int[No][No]; for (int i=0;i<length;i++){ for (int j=0;j<length;j++){ C[i][j]=0; C[i][j]=A[i][j]+B[i][j]; // printf("%2d",C[i][j]); } } return C; …

Member Avatar for Dave Sinkula
0
78
Member Avatar for cam9856

Hello, I was wondering if it was possible to take a string variable or an integer variable and send it to another computer like client/server architecture and also read that data from that same computer. I am thinking that winsock will be ideal for doing this but if anyone knows …

Member Avatar for cam9856
0
152
Member Avatar for xtr.eme

I am a beginner and am learning C++ and QT I would like to know how to make an interface like the one in windows media player 11 - one that is completely custom including the minimise and close icons. What would this involve?

Member Avatar for Kob0724
0
83
Member Avatar for salman213

[code] #include <iostream> using namespace std; class CRectangle { int x, y; public: void set_values (int,int); int area () {return (x*y);} }; void CRectangle::set_values (int a, int b) { x = a; y = b; } int main () { CRectangle rect, rectb; rect.set_values (3,4); rectb.set_values (5,6); cout << "rect …

Member Avatar for salman213
0
144
Member Avatar for Shaun32887

Hey everyone, I'm a third year engineering student and a new programmer who needs to learn some C++ for a job this summer. My boss advised me to look into utilizing a hash table to get my project done. Hash tables aren't covered in the textbook I have. I've done …

Member Avatar for Shaun32887
0
149
Member Avatar for Thew

Hello, how can I create a window (best in Managed C++), that will stay in the parent form like MDI child. It's something similiar as in graphic editors (3DS,Maya). I attached an image how do I imagine it should be (Second window in image is the one I want to …

0
39
Member Avatar for lazytypist

Imagine a number system based on the entire English alphabet, that is, using the symbols "0ABCDEFGHIJKLMNOPQRSTUVWXYZ". Write a program that will calculate the sum of two numbers expressed in this system. The program should ask for the two numbers and output the numbers and their sum as follows (italics indicate …

Member Avatar for William Hemsworth
0
153
Member Avatar for salman213

Hi, I am a beginner in C++, I was just wondering what is it good for. This is probably a dumb question but I was searching on yahoo and google (What is C++ good for), and I did not find any real answers. What do people use it for? Is …

Member Avatar for Narue
0
564
Member Avatar for anifreak

hello, ok i have this simple linked list program, as u can see below i got three functions: one to insert a node in the first of the list, the second to insert a node in the middle and the third to insert a node in the last of the …

Member Avatar for anifreak
0
252
Member Avatar for kux

What i want to do is write some of the rows of a report style CListCtrl with a color and other rows with another color, but if I switch the color with SetTextColor the color of the text in the entire control switches, i want it to switch just for …

Member Avatar for mitrmkar
0
152
Member Avatar for perito

ok here is exactly what Im trying to do, I have to insert 10 strings in 10 different textboxes in the shortest possible time (half a second counts), so I thought the best way is to store them all in a program before the timer starts and then simply press …

Member Avatar for perito
0
111
Member Avatar for Jennifer84

I am trying to make something work but are not sure what I am doing wrong. I have a comboBox where I will select an Item with the eventhandler below. When I select an Item I want the messageBox to show a message Once but the message is showing over …

Member Avatar for Radical Edward
0
88
Member Avatar for mauripelto

Please see my post in the Community Introductions also. I know a little about C++. I'm committed to working in the DEV-C++ IDE environment. I want to learn very simple graphics. I went to the website: [url]www.uniqueness-template.com/devcpp/[/url] and found there the commands "moveto" and "lineto" as well as the linker …

Member Avatar for Duoas
0
109
Member Avatar for zoner7

I am currently reading the learn C++ in 21 days tutorial. In a chapter on references, when the author summarizes some of the main points inside a respective section, he explicitly states, "DON'T return a reference to a local object. " I am simply curious what this means. I have …

Member Avatar for ff4930
0
87
Member Avatar for mrboolf

Hi all. I'm trying to write a 8 Queen Problem solving program in C++ as an assignement for an exam. I created a Matrix Board class to represent the chessboard with some functions such as put_Queen or check_Board for invalid positioning. I haven't yet begin to write the solving algorithm, …

Member Avatar for mrboolf
0
204
Member Avatar for mauripelto

I came here to see if I can get some help in C++, using the DEV-C++ IDE. I can write simple code to solve equations. Now, I want to graph the results. I got as far as using "initWindow", "moveto", and "lineto", to draw a figure. There must be a …

Member Avatar for Salem
0
78
Member Avatar for bussumarus

I'm having a small problem with debugging my application in VS C++. When I pass in a single parameter, the debugger insists 2 parameters have been passed in. The first parameter is invariably "d" and the second parameter is always the first character of whatever I pass in. Further, if …

Member Avatar for bussumarus
0
82
Member Avatar for hacker9801

If you use the new operator on a class, say [code=c++]class dummy { public: string f; }; int main(int argc, char *argv[]) { dummy *p = new dummy; return 0; }[/code] do you have to use the delete operator on [icode]p[/icode]? (since, apparently, it utilizes new.)

Member Avatar for hacker9801
0
88
Member Avatar for Alex Edwards

This isn't exactly a thread about a particular question, but a thread that may help people with memory dynamically allocated/deallocated during runtime. The below example goes over pointers in multiple dimensions-- [code=c++] #include <cstdlib> #include <iostream> /** This program can be used to determine whether pointers are deleted or not …

Member Avatar for vijayan121
0
100
Member Avatar for zoner7

I've always used the Dev C++ compiler; however, I keep hearing how the software has little support. Additionally, I have heard people praise the debugger of Visual C++. So, end result, I'm deciding to switch from one to the other. My only problem now is that I can't make the …

Member Avatar for zoner7
0
104
Member Avatar for salman213

Hi, I was recently reading a tutorial on C++ and I had a question about dynamic memory. The first paragraph of the tutorial stated the following: [I] "Until now, in all our programs, we have only had as much memory available as we declared for our variables, having the size …

Member Avatar for Cait
0
100
Member Avatar for JackDurden

I need some help keeping track of letters the user inputs. With my current code it only outputs one letter at a time of the word to be guessed. Can anyone help? #include <iostream> #include <fstream> #include <string> #include <iomanip> #include <time.h> using namespace std; void Hangman(); void LeftArm(); void …

Member Avatar for VernonDozier
0
85
Member Avatar for raul15791

Hi, I've been given the following task: 1. Read some .h header files from a few different folder in different directories. 2. Extract only the functions in the files and store all of them into a single text file. 3. Repeat the step 1 and 2 again but extract info …

Member Avatar for raul15791
0
592
Member Avatar for Noe'

How to setup Borland C++ IDE Environment? I've loaded the Borland C++, it went ok. Now what of the environment and the libraries, includes, and source directories. Apparently, the obvious isn't working. The following is how I have things set: Includes: c:\bc5\include ; c:\bc5\cpk6501\cpk6501\inc Library: c:\bc5\lib ; c:\bc5\cpk6501\cpk6501\lib Source: c:\bc5\output\intermed …

Member Avatar for tesuji
0
228

The End.