49,761 Topics

Member Avatar for
Member Avatar for ardila

PROJECT 6: MIRROR CALCULATIONS DUE by midnight 11/04/08 INTRODUCTION This is the first of a 3-project series. The next two projects, pro7 and pro8 will expand on this assignment. Therefore, it is important that you do well in pro6. This project is your introduction to object-oriented programming (OOP). Here, you …

Member Avatar for Freaky_Chris
0
146
Member Avatar for amarie

HI, everyone. I am having trouble getting the index of the location of the search number to print out. This is my program. Any help would be greatly appreciated! [code]#include<iostream.h> #include<cmath> void sortit(int x[], int n) { int temp,i,j; for(i=0;i<n;i++) for(j=i;j<n;j++) if(x[i]>x[j]) { temp=x[i]; x[i]=x[j]; x[j]=temp; } } void bsearch(int …

Member Avatar for Freaky_Chris
0
173
Member Avatar for chococrack

I have three files (myClass.h, myClass.cpp, and main.cpp) [code] // // myClass.h #ifndef MYCLASS_H_ #define MYCLASS_H_ template <class element_type> class myClass { public: myClass(); ~myClass(); }; #endif /* MYCLASS_H_ */ [/code] [code] // // myClass.cpp #include "myClass.h" template <class element_type> myClass<element_type>::myClass() { } template <class element_type> myClass<element_type>::~myClass() { } [/code] …

Member Avatar for Alex Edwards
0
183
Member Avatar for nareshvlsi

hi all, plesae any one can send me c++ code for radix-2 Fast Fourier Transform.. my email:[I] << email id snipped >>[/I]

Member Avatar for Salem
-2
227
Member Avatar for sekola

i have used c++ to run windows commands in windows\system32. i am sure u r all very farmiliar with that. however, the procedure seems not to be able to access other .exe files in other folders on my machine. please advice.;)

Member Avatar for Salem
0
94
Member Avatar for piggysmile

I came across [URL="http://www.brainbashers.com/searchengineshow.asp?ref=ZESB"]this interesting puzzle[/URL]. How would you code the solution to this?

Member Avatar for ArkM
0
89
Member Avatar for Jason123

I am required to create a program that will allow user to enter employee name,age and update salary later on. After which able to generate out the details. I am trying to declare a class object in the form of an array so that i can input data and then …

Member Avatar for Jason123
0
185
Member Avatar for salman1354

Hello all, I'm having difficulty with reading data from external files. I have to read two inputs from two Excel files. One is a matrix A[3][20] which is stored as a 3x5 matrix (in Excel format) in the file AData.xls and the other one is a vector dV[35] which is …

Member Avatar for Lerner
0
85
Member Avatar for dtaylor01

Can someone take a look at my code and see if they notice something wrong. [ICODE]int score; char grade =0; // read in total score cout << endl; cout << "Enter total score (float, must be <= 100): "; cin >> score; if (score >= 85); grade = 'A'; else …

Member Avatar for chococrack
0
239
Member Avatar for DragonReborn225

hey, this program is supposed to calculate fractions, and I feel that I have most of the code down, but I can't get past the fractions.cpp:50: error: expected primary-expression before 'char' error, its probably something misicule, but I can't get it for the life of me. The error is in …

Member Avatar for emotionalone
0
471
Member Avatar for Balinor

hi just a few questions, no long code this time, might help me get an answer :) . (im using borland C++ builder 2006) 1. hot to open up the default browser from the form main menu? at a pre-determined url [CODE] FILE GAME HELP ABOUT WEBSITE << what code …

Member Avatar for Balinor
0
75
Member Avatar for tefismp

Someone out there please help me i must do a function for a bucket sort but i dont know how and the only things i must use are normal arrays and pointers no strange functions and libraries i need the code in c++ please i know what the program does …

Member Avatar for Freaky_Chris
0
162
Member Avatar for asifjavaid

Hi all guys, I am using MS VC++.NET 2003 I have also installed MS VS++2005 and 2008 on the same computer. Now when I ran the previous programs which are programed in VC++2003, now I am facing the following errors. Error spawning 'link.exe' Error spawning 'cl.exe'. can any one tell …

Member Avatar for Denniz
0
222
Member Avatar for christiangirl

I need to print the contents of an array backwards, but every time I try it just prints a a smiley face, or something like that. Here's the code, it isin three files: [code] main file: #include <iostream> #include "testArray.cpp" using namespace std; int main() { testArray test; char ch; …

Member Avatar for Freaky_Chris
0
240
Member Avatar for grisha83

Hello, it the same old program calculator i have corrected errors that were preventing me from running the program. Now that i have done it i am facing another issue; It doesnt perform needed computations such as +-* and etc. It must be my switch fn. Any help will be …

Member Avatar for Evan M
0
140
Member Avatar for Se7Olutionyg

[CODE]#include <math.h> #include <iostream> using namespace std; void instruction(); float clean (char , float ,float ); float do_next_op (char, float, float); float clean1 (char input, float num); int main() { //input char input; float accum,num; // instructions (); void instruction(); float clean (char op1, float total,float num); float clean1 (char …

Member Avatar for Denniz
0
81
Member Avatar for Evan M

As I was busy inlining some of my functions, I was wondering if it is really necessary to inline anything. Doesn't the compiler automatically inline stuff, or do I have false memories? And if the compiler does inline stuff for me, would it be best to let it do its …

Member Avatar for Evan M
0
132
Member Avatar for grisha83

Hello, I am writing the code for my basic calculator program and having some issues with it. I keep getting the same error, which doesn't let even let me see whether my program works. Could you please take a look at it and at least direct me in a direction? …

Member Avatar for grisha83
0
96
Member Avatar for kenji

I have a question regarding pointers to member functions, this is the first time that I have come across them and I have no idea how to write the function for it. This is the function prototype: [icode] const char* getData() const; [/icode] I understand what it is and how …

Member Avatar for seanhunt
0
154
Member Avatar for koman

[code] #include <iostream> using namespace std; int main () { int j; int t; int p; int num; cout << " Please enter an even integer greater than 2: "; cin >> num; for ( int i = 2 ; i < num; i++ ) if ( ( i == …

Member Avatar for stilllearning
0
157
Member Avatar for samjars

I have just started studying C++ and am trying to write an interactive C++ program. The program should be a form of supermarket receipt. The format/sample is given below CASH 20000 [U][B]ITEM(S) PRICE[/B][/U] Soap 2000 beef 3000 cake 1500 book 2000 Bags 4000 CHANGE 7500 I have tried my best …

Member Avatar for Salem
0
94
Member Avatar for Jason123

i have a 2D array of emp[20][10] How can i do it such that it only prints out the selected index like emp[0][0] to emp[0][10] etc. It will print around more than the selected.. [code=cplusplus] for(int i= 0; i < 20; i++) { for (int j = 0; j < …

Member Avatar for seanhunt
0
98
Member Avatar for guest7
Member Avatar for Ancient Dragon
0
124
Member Avatar for cerb63

Modify the original Hero's Inventory I assignment to allow the user to create an inventory which not only holds the name of the objects obtained, but their point values as well. You will do this using a single structure, so that string names and numeric point values may be housed …

Member Avatar for Ancient Dragon
0
245
Member Avatar for atreides27

I'm cryptically told nothing more then "your code is almost completely wrong" this is supposed to be a program that reads from an input file (infile.dat) one line of "programming advice" to a user. Then the user enters their own advice for the next person who runs the program to …

Member Avatar for Ancient Dragon
0
112
Member Avatar for LADY187

Hi i did the simple part of my project and got it to run but now i have to add in prototypes. can someone please help bool validRadius(double); bool validLengthAndWidth(double, double); bool validBaseAnd Height(double, double); I will also create functions which will calculate the area of the various geometric objects. …

Member Avatar for LADY187
0
105
Member Avatar for guest7

Hi, I am getting the following error : test.o(11488) malloc: *** mmap(size=2097152) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug test.o(11488) malloc: *** mmap(size=2097152) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug test.o(11488) malloc: …

Member Avatar for guest7
0
187
Member Avatar for Se7Olutionyg

[CODE]#include <math.h> #include <iostream> using namespace std; void instruction(); int calculator (char); void divide_by_zero (); float do_next_op (char, float, float); int main() { //input char input; float accum,num; // instructions (); void instruction(); accum = 0 ; do { //get input cout<< " : " ; cin >> input; cin …

Member Avatar for Denniz
0
180
Member Avatar for LADY187

[code=cplusplus] #include <iostream> #include <fstream> #include <stdlib.h> #include <iomanip> using namespace std; int main () { ifstream inFile; //declare variables int counter = 0, //row counter countErr = 0, //counter for error message id; double grade1, grade2, grade3, grade4, gpa, cTotal1 = 0, cTotal2 = 0, cTotal3 = 0, cTotal4 …

Member Avatar for chococrack
0
106
Member Avatar for Ancient Dragon

If anyone can answer [URL="http://www.programmingforums.org/thread16958.html"]my question on PFO [/URL]I'd apprecaite an answer. I don't want to repeat it here because it is somewhat lengthy.

Member Avatar for Ancient Dragon
0
79

The End.