49,766 Topics

Member Avatar for
Member Avatar for jkiblin88
Member Avatar for Sci@phy
0
34
Member Avatar for freelancelote

Hi, is there a factorial function implemented on math lib? Alternatively, is there any way I could check if it's implemented on my compiler? thanks

Member Avatar for freelancelote
0
88
Member Avatar for sarah_ella

Hi, I'm trying to read a series of ascii characters from a text file as their corresponding decimal integers. However when I try to read in the # 26 it is read in as a # 10 and no further characters after this are read. I've found out that # …

Member Avatar for sarah_ella
0
185
Member Avatar for hugoboss911

Hi all, im doing a uni project and ive run into a little trouble im writing a program in cpp (has to be cpp because of other constraints) this program will get values from a file and depending on the values, send a high or low signal to the corresponding …

Member Avatar for Freaky_Chris
0
150
Member Avatar for ShadowOfBlood

I was assigned a homework project that's starting to get annoying. I can't figure out what's going wrong with it. Here's the question: The number Pi may be calculated using the following infinite series: Pi = 4(1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + ... ) …

Member Avatar for VernonDozier
0
589
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
152
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
174
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
187
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
248
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
98
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
91
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
186
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
86
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
243
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
475
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
76
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
163
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
226
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
243
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
142
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
135
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
97
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
156
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
163
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
95
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
99
Member Avatar for guest7
Member Avatar for Ancient Dragon
0
125
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
246
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
114

The End.