49,761 Topics
| |
Hello, i need to make program which can do squaring, so x^n. I can do it with pow(x,n): [code]#include <iostream> #include <cmath> using namespace std; int main() { double x, c; int n; cout << "Alap = "; cin >> x; cout << "Kitevo = "; cin >> n; if … | |
Hello; I am doing a practice problem to write a program that allows a user to enter a number between 1 and 999. The code MUST be cutoff at 999 and no other numbers past that should work. I have developed a code, but it allows the user to enter … | |
The program is suppose to [COLOR=#000000]1. [/COLOR][COLOR=#000000]Pull 5 offensive players into a file. Pull 3 defensive players into a file.[/COLOR] [COLOR=#000000]2. [/COLOR][COLOR=#000000]Sort both files by LAST name.[/COLOR] The error says error C3861: 'bubblesort2': identifier not found. [inlinecode] [COLOR=#008000]//Laura Patrick[/COLOR] [COLOR=#008000]//EGR 126-11[/COLOR] [COLOR=#008000]//March 20, 2007[/COLOR] [COLOR=#008000]//Ex 11.5 #6[/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#800000]<iostream>[/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#800000]<cstdlib>[/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#800000]<iomanip>[/COLOR] … | |
[HTML]Is there a way(function) to distingusih between different data types?[/HTML] If u can, provide me with the function code, please?:) | |
I have a hw question that asks us to create an STL funciton that takes an argument of type map<string, int> and an integer and returns vector containin all positions in map for which the integer value is found. The function works from what I can test. But I wanto … | |
Would somebody mind looking at this code and giving me some advice as to the copy constructor and assignment operator overload function? When I try to use this class in my program, I get the following error: error C2679: binary '=' : no operator defined which takes a right-hand operand … | |
hello,,,everyone,I just want to ask a list of sites to where i could learn GUI programming in c++ for the beginners like me.i hope you could help me about this one and be one of my circle of friends.you may just add me in your yahoo messenger jk_bscomp or e-mail … | |
Hi, I have a file in the format of: First-Name Last-Name StudentNumber Grade1 Grade2 Grade3 Any student may up to 10 grades, and I want to read the information from the text file into a vector. My question is, how can I read the file into the vector so that … | |
Hi, I am writing a function that needs to return either a R S or P. It works fine if what I am inputing is a R S or P. If something else is enter it acts funny. Any suggestions to help me out? [code=c++] char getUserChoice () { char … | |
hi every one, im working on a project which is the assembler of SIC language,im using a mixture of c and c++ functions in my c++ program by including <stdio.h> and <iostream.h>header files.... my problem is that im reading from file,this file contains the source code of SIC language...i want … | |
i have this simple program im writing to help my dads business. thoguh it doesnt seem to be working, this is what i have currently [code=c++] #include<iostream> using namespace std; int change(double money,int onedollar,int fiftycent,int twentycent,int tencent,int fivecent); int main() { int money, onedollar, fiftycent, twentycent, tencent, fivecent; cout << … | |
,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Nimbus Sans L"; font-size:x-small } --> ahmm hi everyone i'm a newbie here at daniweb.. but i have an unfinished business(project).. guys.. pls.. help me to solve this.. or give some comments or replies in my problem.. this is my problem.. i don't know what function/s should … | |
[CODE]#ifndef HUGEINTEGER_H #define HUGEINTEGER_H class HugeInteger { public: HugeInteger(); void input(); int setNumber(char []); void output(); void convertToInteger(); void subtract(); bool isEqualTo(); bool isNotEqualTo(); bool isGreaterThan(); bool isLessThan(); bool isGreaterThanOrEqualTo(); bool isLessThanOrEqualTo(); bool isZero(); ~HugeInteger(); private: char a[41]; char b[41]; int *array1; int *array2; int result[41]; }; #endif [/CODE] [CODE]#include<iostream> … | |
Hey all, I was wondering could someone help me on writing a file to a notepad.exe file. What i need help on is i have a gam and i want to record how many times the player 1 & 2 has won lost or had a draw. How would i … | |
[code=c++] void playAgain() { char again; cout << "Do you want to play again (y/n)?: "; cin >> again; if (again == 'y') chooseOption(); else if (again == 'n') cout << endl << "Thanks for playing Connect Four, the game of the clever people!"; else cout << "Invalid Choice" << … | |
Hi, I can't get cin.getline to work properly, I'm using it inside a for loop.. it gets the input sucessfuly when the loop is executed for the first time(i=0), but it doesn't wait to take any input on the next times..the program just moves to the next line.. [code=c++] #include … | |
Hi, I have this program in C++ and I am struggling to understand as to why I am not able to store a value in an integer declared in the program as double within the acceptable range of [B]2.2e-308 to 1.8e308[/B]. Here this page also says so in a table: … | |
hi,i have to implement multiplication of two huge integers of 40 or more digits.i've made a function in a class for its implementation but its not working.plz help if u find any logical errors in it. [CODE]void HugeInteger::multiplyHugeIntegers(HugeInteger H1,HugeInteger H2) { int carry=0; int count=0; // introduced to place the … | |
Hi there, I need to make a piece of code in C that 1. opens a specified file, 2. Reads the data in the file and separates it as shown below, 3. Converts the strings into integers and then perfoms some manipulation on them, 4. returns the new values to … | |
Hello, I found the code for bubble sort in C++. With the code below th[U][/U][URL="http://www.webmaster-talk.com/#"][/URL]e output will be: 23 8 7 6 6 5 2 2 1 Is it possible that sorts the numbers so the output will show all changes. In example: 9,6,5,23,2,6,2,7,1,8 9,6,23,5,2,6,2,7,1,8 .... .... .... 23,9,8,7,6,6,5,2,2,1 Thanking … | |
hey guys i got this iece of code on a program i am writing, and i was jus twondering if you could help me to convert it so it uses the conditional operator to make it into a 1 line code, cheers [code=C++] int total, start, stop, increment; if (total … | |
Hello everyone, this is my first post. As can be quite rightly guessed, I am new to C++ and struggling with some coursework. My task is to produce a program that prints out 5000 random numbers between 1-5, also printing out the frequency of each given number. I have searched … | |
Hi, Wondering if I could get some help. This program is supposed to : -Input student data(firstname,lastname,student#, and a vector of Grades(up to 10 grades) with a grade and assignment name(notworking)) from a text file and store it in a vector -Have a menu system for navigation -add a student … | |
Hi, I have written a little prgrm to help me on my job. I want to now be able to use it on other machines than the one it was written on. I wrote it in Visual C++ .NET Express, downloaded from Microsoft, the free one. The machine I wrote … | |
Hi there, i writing this progam for my parallel port hardware but i could not solve my error.Plz help me...... fatal error C1057: unexpected end of file in macro expansion Error executing cl.exe. | |
Hi Guys, I was just reading up Lippman to learn more C++ and came across the third syntax of new operator called "placement new". I have a specific problem where I thot I'll use it, but it turns out to be a total fiasco. :). My requirement is: I need … | |
Hi, I am trying to compile some code using a g++ GNU Compiler, and it keeps complaining. Other people have told me the exact same code compiles with their compiler. Anyone know why? Here is the code... [code=c++] #include <iostream> #include <ctime> #include <cstdlib> using namespace std; char getUserChoice(); char … | |
how do i compare dis to a source code..?? The Database: AF - Afghanistan AL - Albania PH - Philippines: Smart, Globe(country's telephone operator) US - United States: Digicell, Movistar The ouput must be: Enter Country Code: PH Philippines: Smart, Globe pls.. give me some source code.. | |
I m using oracle pro compiler to connect to the database and execute dml statement in a C++ program using visual studio 2005. when this procompiler connects to database, it creates a communication area known as sqlca. I have connected a file named test2.cpp, to databse using this compiler. Till … | |
Hi, I am writing a program that needs to search particular strings in a text file. The strings are typed in a text box by the user and then when the text file is opened, using fileDialog, the program searches that file using the string in the text box. I … |
The End.