51,593 Topics

Member Avatar for
Member Avatar for headedtomexico

I have a simple class [CODE]class Info { public: long One[31]; long Two[79]; };[/CODE] i'm reading values from a couple char arrays, when I write to Two[0], it overwrites One[31]. [CODE]CurInfo->One[31] = atol(BufferOne); chatoutf("%d",CurInfo->One[31]); CurInfo->Two[0] = atol(BufferTwo); chatoutf("%d",CurInfo->One[31]);[/CODE] if I feed bufferone a -1, and then buffertwo a 623, I …

Member Avatar for headedtomexico
0
126
Member Avatar for Peter_morley

I am trying to finish up my homework but I don't really understand the question Consider the array temps that the following statements define: typedef double WeekType[DAY_PER_WEEK]; typedef WeekType YearType[WEEKS_PER_YEAR]; YearType temps; temps[12] is a one-dimensional array of seven real numbers. Suppose that you want to compute the average of …

Member Avatar for Fbody
1
192
Member Avatar for MAbebe

Can any one please help me figure out what I am doing wrong on the following C++ programing language? I couldn't figure out what I am doing wronge that it gave me a hard time to compile it. Here is what I have done so far. using namespace std; struct …

Member Avatar for chococrack
0
165
Member Avatar for rowanmck

I'm having problems with the code below, it compiles but no matter what I do it doesn't open the .csv file that I want it to. The file name is passed into this funtion then it must read the values in and then print them out, simple, yet I cant …

Member Avatar for Fbody
0
441
Member Avatar for syd919

Hello Im new to qt and I have a problem, I am trying to connect a radio button to a signal and a slot that have different number of arguments,I know this is not possible, is the any way to get around it? [code=c]here is my code: void myclass::createbutton() { …

0
51
Member Avatar for Parthmishr

I just finished writing a string class that includes functions for generating random string (why I don't know, as I have never really needed random strings before). Basically the user can pass the function an enum citing what kind of string that'd like (i.e. AllUpperCase or AllNumeric). There is also …

Member Avatar for Ancient Dragon
0
72
Member Avatar for malvi

Hello As per my project requirement i want to update edit box per second. give me an idea how can i do it?

Member Avatar for Ancient Dragon
0
168
Member Avatar for chandrut

1) how to connect c to database..... 2) how to connect C++ to Database...... Reply me its urgent.

Member Avatar for Ancient Dragon
0
119
Member Avatar for CodyOebel

Ok I am doing some windows API programming that deals with two applications\windows. One window is my program, the other is a games window. I am building my application to output the coordinates to my applications screen. The coordinates are to be retrieved and are needs to be relative to …

Member Avatar for chococrack
0
274
Member Avatar for jelinky

this is the code i have: [CODE]#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; ifstream infile("grade_data.txt"); string answers, key; int num_grades; void highest(double [], int); void lowest(double [], int); const int NUM_QUESTIONS = 10; double scores[NUM_QUESTIONS + 1]; int results; //how many right answers int wrong=0; //how …

Member Avatar for Fbody
0
132
Member Avatar for bruno386

I am trying to send a udp query, the query works and I recieve -some- data back. However the string I recieve back is not complete, its cut short. If I send the same UDP query using netcat I get the full response. Must I increase the size of the …

0
122
Member Avatar for ahem

this is the problem given to me using c++. please help me. thanks. -create a program that will prompt the user to enter how many random numbers are to be displayed. display the nos. in 5 columns. after displaying nos... output the smallest and largest number then get the sum. …

Member Avatar for Stefano Mtangoo
-1
68
Member Avatar for the rider

Hello everybody, I'm a Borland C++ 5.02 user, a pretty old package, but very good for the kind of applications I'm used to write. My problem is that I had to reinstall it on a new machine after the old one is dead, but after the installation I'm not able …

Member Avatar for carolannberdin
0
112
Member Avatar for blackmagic01021

Hello, I have a forth order equation aX^4+bX^3+cX^2+dX+e=0 How to solve the equation? I have looked at the follwing thread on a forum but I can not understand the assignment of the variables. [url]http://www.cplusplus.com/forum/general/8129/[/url] Any ideas?

Member Avatar for StuXYZ
0
174
Member Avatar for dflatt

is this good practise or even possible as i'm not on my comp. [CODE] class C3dshape { private: int mLength; int mWidth; int mDepth; public: int getlength(); int getwidth(); int getdepth(); void setvalues(); }; int C3dshape::getlength() return mLength; int C3dshape::getwidth() return mWidth; int C3dshape::getdepth() return mDepth; void C3dshape::setvalues() { length …

Member Avatar for Ancient Dragon
0
133
Member Avatar for ScalesTech

// Energy drink assignment from page 77 #18 #include <iostream> using namespace std; int main () [{ int numberSurveyed = 12,467; int energyDrinkers; int citrusFlavor; energyDrinkers =static_cast<int>(numberSurveyed)* 0.14; citrusFlavor =static_cast<int>(energyDrinkers)* 0.64; // Approimate calculations from survey print out // 14% of 12,467 cout << "Approximate number of customers who purchase …

Member Avatar for ScalesTech
-1
381
Member Avatar for Hawkpath

Hello, I made a class and now I want to store instances of those classes in an array. I looked it up and found it was as easy as: [CODE]className arrayName[x][/CODE] When I tried that I got this error: [B]error: no matching function for call to 'archerTower::archerTower()'| [/B] My class: …

Member Avatar for Hawkpath
0
117
Member Avatar for xiansen

hi guys, I've been working on this program and I am kind of lost. Please help me point out what i am doing wrong. this is the description of the program. You are to code a plane reservation application, which allows the user to keep track of seat reservations. Seat …

Member Avatar for NathanOliver
0
496
Member Avatar for ana_1234

Hi, I am in dire need of help. I have tried every way I could think up and I cant get it I need a diamond that looks like perfect rhombus with an a border: (im trying to get this site to make my shape to come out right but …

Member Avatar for ana_1234
0
140
Member Avatar for bmos31

So I have a program scenario for a postman who carries out an experiment: 1. He has mailboxes numbered 1-150 all of which are 'closed' 2. Starting with mailbox 2, he 'opens' all even-numbered mailboxes, leaving all others 'closed' 3. Next, beginning with mailbox 3,goes on to 'open' every third …

Member Avatar for bmos31
0
829
Member Avatar for vbx_wx
Member Avatar for wittykitty

I seem to be stuck in an endless loop here and was wondering if someone could help? I am writing this method to a linked list class. There are strings of words in a file that is read into the linked list. It needs to read the last string in …

Member Avatar for Lerner
0
134
Member Avatar for Frederick2

For the past 12 years I've lived in mortal, cowering, abject fear of one particular feature of the Visual Studio 6 C/C++ IDE, and that is the 'Find' feature on the 'Edit' menu where you can fill in the textbox to find a symbol in your file, and then click …

Member Avatar for Frederick2
0
202
Member Avatar for vbx_wx

Hello,i want to implement a program that verify what mail I get. Anybody can tell me if there is a library to work with mail,or where to get started, Thanx in advance

Member Avatar for vbx_wx
0
82
Member Avatar for Sismetic

Hi, Im trying to do a screen-flashing application, that flashes the screen according to the music(which will be frequencies, such as healing frequencies, etc...). I already made the player and know how will I make the screen flash, but I need to make the screen flash super fast according to …

Member Avatar for Sismetic
0
191
Member Avatar for leaposto

[B]Code:[/B] [CODE]class statistic{ double * store; int noOfData; public: statistic(double* s,int sz); statistic(const statistic &); ~statistic(); double average() const; int size() const; const double* data() const; }; statistic::statistic (double * s , int sz):noOfData(sz){ store=new double[noOfData]; for (int i=0;i<noOfData;i++) store[i]=s[i]; } [/CODE] Definition and test code of the class.. Can …

Member Avatar for Fbody
0
128
Member Avatar for cogitoergosum18

[CODE]#include <iostream> using namespace std; int main() { double firstNo;// first number is stored here double secondNo; double result;//variable for result when first and second number are operated upon double operation;// place to store the user's inputed operation // asks the user to choose the first number cout<< "Enter in …

Member Avatar for Takeshi91k
0
211
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
158
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
158
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
42
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
160
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
414
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
237
Member Avatar for gumbald

I'm having problems with the telnet on a device, so wanting to run a program attached by serial port to the device and then have other machines access this by C# remoting. However, I can't seem to find a way to give the interface access to this local resource after …

0
32
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
419
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
165
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
41
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
166
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
163
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
109
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
246
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
175
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
147
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
69
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
156
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
113

The End.