49,761 Topics
| |
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 … | |
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 … | |
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] … | |
hi all, plesae any one can send me c++ code for radix-2 Fast Fourier Transform.. my email:[I] << email id snipped >>[/I] | |
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.;) | |
I came across [URL="http://www.brainbashers.com/searchengineshow.asp?ref=ZESB"]this interesting puzzle[/URL]. How would you code the solution to this? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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; … | |
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 … | |
[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 … | |
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 … | |
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? … | |
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 … | |
[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 == … | |
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 … | |
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 < … | |
Hi, How can i delete a particular element using delete operator? Thanks | |
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 … | |
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 … | |
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. … | |
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: … | |
[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 … | |
[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 … | |
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. |
The End.