49,757 Topics

Member Avatar for
Member Avatar for franchico

Hi, I'm mechanical engineering graduate student in Portugal. I'm familiarized with c++ but I've been having problems with the windows forms. I'm trying to make a form that would compile diferent data with inviscid fluid flow formulas but I've got one major problem. I've done hundreds of google searches and …

Member Avatar for franchico
0
5K
Member Avatar for gsfare

Hello everyone. I am experienceing some rather strange behaviour regarding the instantiation of an object. It's a templated custom array type object, something like this. [CODE] template <class T> class Array { public: // Construction/destruction. Array( void ); Array( unsigned int size ); Array( const Array<T> &array ); ~Array( void …

Member Avatar for gsfare
0
156
Member Avatar for kz07

Can anyone help me on how to display my infix notation with parentheses? 4+3 should be displayed as (4+3) also, my code only works for simple expressions like 4+0, it can translate the infix,prefix,and postfix correctly, but when the expression grows, for some reason, its outputting the incorrect notations for …

Member Avatar for Narue
0
1K
Member Avatar for qtl

I wrote a very simple vector class to call level 1 BLAS through MKL, [CODE] #include<mkl.h> #include<stdexcept> #ifndef _x_matrix #define _x_matrix class xVec{ private: double *v; int n; public: xVec():n(0),v(0){} xVec(int a):n(a),v(new double[n]){} xVec(int a, double c){ n=a; v=new double[n]; for(int i=0; i<n; ++i) v[i]=c; } ~xVec(){if(v) delete[]v;} double &operator()(int …

Member Avatar for qtl
0
156
Member Avatar for aikiart

Good afternoon, I've got an assignement where i need to set up a parent class and a child class with .cpp files. When I try to call the a function in the child class i get and undefined reference error. I'm able to initialize this class using the default constructor …

Member Avatar for Fbody
0
159
Member Avatar for maheswari c
Member Avatar for korde

sir i want to multiply two matrix 3-by-3 using recursion function please send me source code on mail address <<snip>> thanking you

Member Avatar for Duki
-1
41
Member Avatar for vijaybrar

Hi you can customize it the problem is that when i put 5 it say to low then when i put 6 it say to high or any numbers pls help me.. [CODE] #include <iostream> #include <cstdlib> #include <ctime> #include <conio.h> #include <cmath> using namespace std; char ans; int main() …

Member Avatar for Fbody
0
138
Member Avatar for super-duper

[CODE]//************************************************************************************ // // This program keeps track of speakers' bureau. // It displays a menu, where the user can add info, // view the info of another speaker that's already in there, // and etc. //************************************************************************************* #include "stdafx.h" #include <iostream> #include <iomanip> #include <cstdlib> using namespace std; //************************************************************************************** // function …

Member Avatar for Fbody
0
411
Member Avatar for rebellion346

I can't seem to figure out whats wrong with my logic for the is it a function or not area. I used the following given test with the correct output: f(1) = 1 f(2) = 4 f(3) = 3 f(4) = 1 f(5) = 1 This function is a valid …

Member Avatar for javaAddict
0
235
Member Avatar for adman_2005

The program initially asks the user to insert the secret sentence and the encryption code (an integer number in the range 1-100). Then, the program calls a user-defined function void encrypter (char *, int) that accepts the string pointer and the encryption code. The encryption algorithm is based on the …

Member Avatar for jordan00191
0
412
Member Avatar for User4699

I'm having a problem getting my buffer(string) to print out everything that the user inputs. When I run my code the buffer only prints out the last thing that is inputted. I've tried just about everything and I really do not know what else to do. I'm new to c++ …

Member Avatar for Ancient Dragon
1
162
Member Avatar for Soumya Rajiv

[COLOR="Green"] I am using Lotus C++ API to create DLL's. I use VB6 and Lotus8.5.0 for programming. I am able to create EXE files & am able to execute and see the results. I then created a DLL,used that DLL successfully in LotusScript. But when I tried to use the …

0
38
Member Avatar for super-duper

i'm trying to count the number of people (i called speakers) that are on the list. But, in order to do that, I have to know that there is actually some name is written in that person's spot. In other words, I want the "for" loop to skip/don't count the …

Member Avatar for embooglement
0
165
Member Avatar for lapunluyang

This question was rolled out in our data structures Mid Term or test, i can't remember which. I'm pretty sure it was the mid term. The actual question if I remember correctly was something like. 'Is C++ the King of all Languages, it will always be around and is the …

Member Avatar for Ancient Dragon
0
158
Member Avatar for ticktock

Hey all I have this program that is supposed to output a stickfigure. I got this from my game programming elective class (which I now regret enrolling to) and the professor told us to work on it in a way that the class called "example" with the function render should …

Member Avatar for ticktock
0
104
Member Avatar for exekiel101

[CODE]#include <iostream> using namespace std; int main() { int numbers; numbers = 2; while (numbers <= 1000); { if (numbers % 2 ==0){cout<< numbers;}; if (numbers % 3 ==0){cout<< numbers;}; if (numbers % 4 ==0){cout<< numbers;}; if (numbers % 5 ==0){cout<< numbers;}; if (numbers % 6 ==0){cout<< numbers;}; if (numbers …

Member Avatar for chococrack
0
243
Member Avatar for cjreischl

Hi. I am creating a program for class that can be used to gather statisctical data about the number of movies college students watch in a certain time frame. I have to find the average, median and mode and show this in the output. I am able to get my …

Member Avatar for Cool_Breezey
0
171
Member Avatar for rebellion346

Hey guys, wasn't sure where to post this but i posted it in both categories. Converting the for loop is probably the most confusing for me especially the arrays. Hope you guys can help me out, thanks. [CODE] #include <iostream> using namespace std; int main() { int Function[10][2] = {0}; …

Member Avatar for coil
0
145
Member Avatar for rebellion346

Hey guys, wasn't sure where to post this but i posted it in both categories. Converting the for loop is probably the most confusing for me especially the arrays. Hope you guys can help me out, thanks. [CODE] #include <iostream> using namespace std; int main() { int Function[10][2] = {0}; …

0
67
Member Avatar for kuen

hello, i have a code of the game called 'TRON' in c++ an example of the same game in c++ here [url]http://www.mediafire.com/?vnkslb3x0qbd3q0[/url] ((i tried to upload it here but it says invalid every time)) i can't understand some partss of the code so please geys help me understanding the code …

Member Avatar for kuen
-1
153
Member Avatar for aikiart

Good afternoon, Does anyone know whether it's possible to have more than one overloaded ostream in a class? This is for a time class that i've created however it ouputs data like this 12:12:12:AM, i'd like to use the same ostream operator to output military time 14:12:12, however when I …

Member Avatar for aikiart
0
110
Member Avatar for dcforshaw

Hi all, I am currently working analysising silicon pixel detectors for the LHC at my university. One thing i have to do is to find clusters of signal in a silicon pixel detector. I have directory of macros which handles the data and getting it ready, not important. My goals …

Member Avatar for dcforshaw
0
182
Member Avatar for Dark Byte

Sorry for the newbie question, but what are header files? What should they contain? Just classes and definitions?

Member Avatar for Dark Byte
0
182
Member Avatar for qutecynosure

I want to draw three circles within a pentagon in C++. I also want to give random movement to one of the circles within pentagon. Can anyone tell me the code alongwith the required header files for drawing this. regards

Member Avatar for damnigottajoin
0
1K
Member Avatar for hurbano

i have written the following code for an add fucntion for a linked list implementation. when i run it, it runs correctly. when i went to class today, i found i had made a mistake. my add function adds only a student data type, whereas the assignment was to make …

Member Avatar for hurbano
0
145
Member Avatar for deidara1512

Hi, i know this topic was here several times, but all threads are very old and codes from them are not working for me. So, I need to simulate mouse and keyboard events on my windows (moving mouse,clicking mouse, pushing keyboard buttons). I need to do this all from c++ …

Member Avatar for deidara1512
0
231
Member Avatar for shubhankarmayan

i have been given a series and ihave to find its sum. i'm just a beginner so pleese keep ur program simple; series is like this; 2^2 + ( 2^2+ 4^4) + (2^2 + 4^4 + 6^6).... take in number of terms from user.

Member Avatar for prvnkmr449
0
432
Member Avatar for XMasterrrr

hello guys, sorry if it's wrong topic name but in accelerated c++ book and in chapter 2 exactly i have a problem [CODE]#include <iostream> #include <string> // say what standard-library names we use using std::cin; using std::endl; using std::cout; using std::string; int main() { // ask for the person's name …

Member Avatar for XMasterrrr
0
143
Member Avatar for Matt_L

First I would like to say my knowledge of C++ is limited; most of my experience is in Java. Also this is my first post to daniweb, so please excuse me if I didn't follow proper etiquette (but please let me know). That being said, I have a need to …

Member Avatar for klemmerj
0
122

The End.