51,593 Topics

Member Avatar for
Member Avatar for username99
Member Avatar for only me

hello everybody I need your help please I have Q for u write C++ code to display all emrip numbers between 2 and 1000 and returns their count to the program

Member Avatar for Salem
0
101
Member Avatar for picass0

i have a text file that has delimiter. i wanted to display the test file that will take away the deliminter from my text file. i search through the net was told to use getline() which can include the deliminter. Hope that is someone who can show me an example …

Member Avatar for Nick Evan
0
93
Member Avatar for Heli

Hello, I've been Google'ing(?) like crazy for the last hour or so trying to find an answer to my problem, however the problem is simply that I'm not too sure [i]what[/i] to search for :S My basic problem is that I want to change the default way in which the …

Member Avatar for Nick Evan
0
158
Member Avatar for dpfaff

I am taking a introduction to C++ programming class in college and I am having some issues with my assignment. If anyone can help It would mean a world of diffrence to me. Thanks in advance. Okay the assigenment is to write a program that simulates the lottery, the program …

Member Avatar for Ancient Dragon
0
269
Member Avatar for nurulshidanoni

Can anybody help me whis this error? in red colour... error C2109: subscript requires array or pointer type error C2109: subscript requires array or pointer type : error C2109: subscript requires array or pointer type error C2664: 'void __cdecl std::swap(int &,int &)' : cannot convert parameter 1 from 'int' to …

Member Avatar for Agni
0
959
Member Avatar for kalodakilla

my final assignment is about making a program like a TinyGoogle.. But actually, i'm just a Freshman and it's kinda hard to have all the knowledge to make these all through.. Hope u guys can help, thanks a lot [URL="http://kalodakilla.googlepages.com/CS162-Final-Project-TinyGoogle.pdf"]http://kalodakilla.googlepages.com/CS162-Final-Project-TinyGoogle.pdf[/URL] The first problem is that i dont understand what does …

Member Avatar for dougy83
0
94
Member Avatar for littlestone

For a singleton class, there is only one instance in a process, so it's not necessary to define a member function as static, am I right? Thanks in advance.

Member Avatar for dougy83
0
284
Member Avatar for allialli

[B]hi. can anyone please help me with this assignment?[/B] Write a function called divideMe which takes two integer parameters x and y and returns a double which is the division of these numbers (x / y). If y is zero, print the message "Divisor can not be zero!" and return …

Member Avatar for allialli
0
321
Member Avatar for Ryano24

I wrote this code to re-create the classic race of the tortoise and the hare and everything compiles fine. Just the logic is messed up. When I run the program all I see is BANG AND THEY'RE OFF and who wins. I should be seeing a T for the Tortoise …

Member Avatar for vmanes
0
1K
Member Avatar for sohamghosh

My code for address book is as follows: [code=cplusplus] #include <iostream> #include <cstring> using namespace std; struct { char name[101][30]; char telephone[101][8]; char email[101][20]; char address[101][50]; char postal[101][6]; }employee; void enter() { int n; cout << "Number of entries?\n"; cin >> n; for (int i=0; i<n; i++){ gets_s (employee.name[i]); gets( …

Member Avatar for sohamghosh
0
100
Member Avatar for aquariusdragon2

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 …

Member Avatar for vmanes
0
143
Member Avatar for sommanatt

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 …

0
86
Member Avatar for stan.joe1

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( …

Member Avatar for dmanw100
0
328
Member Avatar for Adrian99420

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 …

Member Avatar for Adrian99420
0
90
Member Avatar for usiel

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 …

Member Avatar for usiel
0
95
Member Avatar for CE Student

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 …

Member Avatar for Narue
0
136
Member Avatar for fusi0n423

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 …

Member Avatar for fusi0n423
0
124
Member Avatar for cuddles23

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 …

Member Avatar for vmanes
0
94
Member Avatar for rustyj110

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 …

0
62
Member Avatar for TPclan

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 …

Member Avatar for Arne Kristoffer
0
127
Member Avatar for Roebuc

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 …

Member Avatar for Roebuc
0
107
Member Avatar for DJ-KhaosTheory

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 …

0
78
Member Avatar for superjacent

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 …

Member Avatar for jade09091990
0
188
Member Avatar for navamous

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 …

Member Avatar for Spagett912
0
219
Member Avatar for sopel39

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 …

Member Avatar for vijayan121
0
108
Member Avatar for Skeezo

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> …

Member Avatar for Skeezo
0
426
Member Avatar for sjcomp

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 …

Member Avatar for sjcomp
0
5K
Member Avatar for snakeman

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

Member Avatar for Ancient Dragon
0
149
Member Avatar for dmanw100

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 …

Member Avatar for dmanw100
0
111
Member Avatar for zaza_thegreat

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() …

Member Avatar for Nick Evan
0
217
Member Avatar for kux

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) …

Member Avatar for Agni
0
263
Member Avatar for toolbox03

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() …

Member Avatar for dougy83
0
157
Member Avatar for Lensva

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", …

Member Avatar for Lensva
0
208
Member Avatar for mikky05v

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 …

Member Avatar for mikky05v
0
140
Member Avatar for ps.sohani

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 …

0
51
Member Avatar for soka2oo7

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 …

Member Avatar for soka2oo7
0
123
Member Avatar for Skeezo

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 …

Member Avatar for vmanes
0
85
Member Avatar for hgedek

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 …

Member Avatar for vijayan121
0
307
Member Avatar for nurulshidanoni

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 …

0
61
Member Avatar for curt1203

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 …

Member Avatar for big24fan
0
98
Member Avatar for chemicaldave

I'm being given the assignment of using the selection sort method to alphabetize a 2D array of names. Specifically I am supposed to modify a selection sort algorithm for integers and convert it for my purposes. I took the skeleton code and tried to convert it. The program compiles and …

Member Avatar for chemicaldave
0
141
Member Avatar for cpp_noobsauce

Hi, I was given this problem: "The user will enter two letters. These letters will be stored in a string using cin.getline. Replace the first letter entered with the second letter entered." The next problem we have will be to replace the letters in a sentence, but I'm stuck on …

Member Avatar for cpp_noobsauce
0
84
Member Avatar for cscode001

Hello. I am new this website and a beginner in Computer Science. I have very little experience in C++. Recently I have been working on this lab and I am stuck at a point where I don't know what to do. Can any1 help me with this code? Here is …

0
45
Member Avatar for tah

Hi Sir Write a C program to count and print the total number of: upper case letters, i.e. ‘A’ to ‘Z’ lower case letters, i.e. ‘a’ to ‘z’

Member Avatar for jephthah
0
264
Member Avatar for tigger0484

using visual studios C++ express 2005 edition this is my code but when I run it I get a bunch of garbage...any suggestions would be greatly appreciated!!!! [code=cplusplus] #include <iostream> #include <fstream> using namespace std; int length(char phrase[]); void concat(char phrase1[], char phrase2[], int measure1); void copy(char phrase1[], char phrase2[]); …

Member Avatar for tigger0484
0
264
Member Avatar for mofoparrot

Hey guys, I'm new here, I looked through the help also searched and couldn't find anything that helped. Although I will be using the Algorithms you guys have on this site. anyways I only took a intro course to C++ about four years ago and don't remember much I wrote …

Member Avatar for mofoparrot
0
132
Member Avatar for ericisshort

This is probably the most frustrating thing in c++ for me. I can handle compile errors just fine, but when I get a core dump, I get so frustrated, because I have no idea where the problem is, especially when I have 300+ lines of code to be looking at. …

Member Avatar for mitrmkar
0
103
Member Avatar for ITJohn89

hi my name is john i have been trying to learn how to design my own software. i have been told in order to i must learn c++ i have just download Visual C++ Express Edition am not to sure what i am doing so if anyone could give me …

Member Avatar for mitrmkar
0
117
Member Avatar for Black Magic

Hey i've made a simple calculator, but i was thinking about adding a square root option.. But is there a actual way to do this or would i have to create my own?? PLEASE REPLY A.S.A.P

Member Avatar for hammerhead
0
136

The End.