49,757 Topics
| |
I have this coded out but it keeps giving me the error message "ifstream" does not have a type. I don't know what to do, sigh. Any help would get appreciated. const int MAXSIZE = 100; double votes[MAXSIZE]; // declaration for array double vote; int count = 0; double total … | |
I have more fluently in writting Java but for this program my advisor need me to convert my program from java to c++. I've already done with c++ code and the result is correct and got the same result as java program but the big problem is that the program … | |
I wants to input a list of day temperatures and count the number of days with temperatures above 20 degrees. The C++ program below is supposed to do this and display the result. A temperature of -100 indicates the end of the data. #include <iostream> using namespace std; int main( … | |
Hi, I created a GUI which contain a few tabpage, I wish to add and name a new tabpage with a single button click. Therefore, I created two window form. With the "add new operator" button, I link to the second form which allow user to key in the name … | |
PLease can somone check it and give me some feedbacks [CODE]include <iostream> #include<iomanip> using std::cin; using namespace std; int max=100; void general_options(); void input(int A[], int maxValue); void input(int A[], int howMany); int count90 (int A[],int howMany); void add10(int [], int howMany); void printGrades(int [], int howMany); main() { //variables … | |
This is my assignment I have to send it today and this week I have many test and I did not any time for solve it please please I need help ITCS102 Assignment #5(chapter 12) Create a class called Employee that maintains information about an employee in a company, each … | |
Hi all I'm new here I've been working on a project that has a multiset class. I need a function that accepts a integer value and returns the value held there. The multiset is a data[SIZE][2] where everything is stored where data[i][0] is the number and data[i][1] is how many … | |
Im working on this program: to write a program that displays the last 10 characters in an order that is reverse of the order they were entered... i've gotten this so far: #include <iostream> #include <string> using namespace std; int main() { string message; cout << " Enter a string … | |
I am trying to create a text-based menu class to give myself a way to create more dynamic menus in programs. Basically the menu class has a vector of option classes that contain the menu-option's name, function to call etc. The problem is that I want to be able to … | |
I am an extreme new comer to C++. Currently I have written a short script in VBscript to delete two specific files on a specific day. This script is set in the start up menu so that it checks for the day of the week. If the day matches the … | |
I am working with classes for the first time. I am trying to make an address book. While I think I have done my header files and class definition files correctly, I am running into a snag with getting it to show on the screen. I went back to a … | |
Gretting fellow coders, I am making a RPG, and need some assistance with the MCI commands. I only have knowledge of namespace std, and any complex code without namespace will be over my head. I am using it for playing mp3 files. I need: the open player call the load … | |
I've just completed an exercise from a book wherein the task is to display a menu of choices each associated to an alphabetical character. The program is to reject invalid characters and only finishing when a valid choice is made. Below is my solution, it achieves the task but I'd … | |
I have to program an Address book program in C++. So far I've done about 40% of the assignment. The main requirements of the Address Book are the following (Which I am confused about are): 1. Display 20 Contacts at a time, using the space bar to go to the … | |
suppose we have template class X and template function template <class A, class B> A* g (B&); how to make something like that? template <class T> class X { template <class A, class B> friend B* g (T&); }; i mean that g<A, B> () is only friend of X … | |
Hello when I try to compile my program I get these errors: 1>funding6c.obj : error LNK2019: unresolved external symbol "void __cdecl ContributorSort(struct Contribution * const,int &)" (?ContributorSort@@YAXQAUContribution@@AAH@Z) referenced in function _main 1>C:\Users\Big Z\Desktop\program 6\Debug\program 6.exe : fatal error LNK1120: 1 unresolved externals what could be causing this? [code=C++] #include <iostream> … | |
Hello, I'd like to split a string into smaller parts using delimiters that are longer than one character. I'm curious if boost::algorithm::split can be used for that. I can not figure out what predicate I should give it to compare strings [CODE=C++] #include <vector> #include <string> #include <boost/algorithm/string/split.hpp> std::vector< std::string … | |
I've created simple C++ ATL Web Service in VisualStudio 2005 Is it possible to host it in Apache or some another web server exept IIS? Any help will be really appreciated. Thanks | |
I finally broke down and wrote my first header file, but one of my functions is acting a little weird... This function is supposed to convert from Celsius to Fahrenheit but whenever I call the function, it returns an incorrect value. Is there an easy way to multiply the float … | |
please help to with this program by mainly using arrays and pointers ,... i need this program to check 2 matrix files "if they contain any character and if they contain cout<<"invalid"; " and to open them from .txt file [code=cplusplus] #include<iostream> #include<fstream> #include<string> #include<cmath> using namespace std; int main() … | |
plz take a look at the following code [CODE] #include <iostream> #include <string> #include <iostream> #include <string> using namespace std; class A { public: string sa; A(string sia); }; class B:public A { public: string sb; B(string sia, string sib); }; A::A(string sia):sa(sia) { } B::B( string sia, string sib):A(sia),sb(sib) … | |
Anyone knows how to capture the data pipe in from linux ls command in c++ program? the command is ls - ali and I need to pipe it to a c++ program by ls - ali|./a.out how do I code the main in c++ to capture the data? int main() … | |
hey again, code below works but it tends to give some info which shouldn't be there: (for example a - 0 where 'a' is a letter and 0 is the times the letter was repeated) [code=cplusplus] #include <iostream> #include <stack> #include <fstream> using namespace std; int main() { fstream fin1("E:\\iras.txt", … | |
Write a program which will accept a Roman numeral input from the keyboard and return to the screen its numeric value. Some of you cases should input unusual or awkward input, and at least one trial must include an improperly formed Roman numeral. The following features of the Roman numeral … | |
Hi All, We have a ACE server which listens to specified port on given IP and sends the required response to the server. This ACE server works correctly as a console application. But it gives problems when we try to integrate this ace server code in service program developed using … | |
I want to know how to develop a matrix calculator that preforms basic matrix operations usin g arrays and/or pointers. Iwant a calculator to do addition ,subtraction ,multiplication ,transpose,checking enquality, checking properties and matrix power & the program will read the data from a file & check if the data … | |
What i am trying to do is pass an array of structs to a function. the code i have so far follows: [code=C++] struct Contribution { string name; double amount; }; const int MAX = 25; typedef Contribution BigSpender; typedef BigSpender ContributionRec[MAX]; const string NAME_FILE = "names.txt"; const string CONTRIBUTION_FILE … | |
Hi.I need an answer to my heap problem. I am creating a 1000 items priority_queue (priority_queue<Molecule*,vector<Molecule*>,SortClass>); Sometimes I need deleteThis(Molecule *mol) function.So this function can delete any item at any index.Pop wont work here if I dont use pop-push until the target.But this takes long time.So I want to learn … | |
I have this programming but I want to sort the total in descending order... How to make an examid together with total after has sort the output? [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace … | |
I am on my last assignment and i have no idea how to do or start this one. This class has gotten to where i understand nothing when i watch the lectures. I have invested so much time trying to learn this stuff and i do not get structs. This … |
The End.